Version: 4.1.3
2.1.2 Version 2 Servlets
interface-version : (one-of/c 'v2) |
This indicates that the servlet is a version two servlet.
manager : manager? |
The manager for the continuations of this servlet. See Continuation Managers for options.
(start initial-request) → response? |
initial-request : request? |
This function is called when an instance of this servlet is started. The argument is the HTTP request that initiated the instance.
An example version 2 module:
#lang scheme |
(require web-server/managers/none) |
(define interface-version 'v2) |
(define manager |
(create-none-manager |
(lambda (req) |
`(html (head (title "No Continuations Here!")) |
(body (h1 "No Continuations Here!")))))) |
(define (start req) |
`(html (head (title "Hello World!")) |
(body (h1 "Hi Mom!")))) |
These servlets should use the web-server/servlet API.