5.12 Serving Scheme Servlets
The web-server/dispatchers/dispatch-servlets module defines a dispatcher constructor that runs servlets written in Scheme.
| ||||||||||||||||||||||||
| ||||||||||||||||||||||||
config:scripts : (box/c cache-table?) | ||||||||||||||||||||||||
url->path : url->path? | ||||||||||||||||||||||||
| ||||||||||||||||||||||||
| ||||||||||||||||||||||||
| ||||||||||||||||||||||||
timeouts-default-servlet : integer? = 30 |
The first returned value is a procedure that refreshes the servlet code cache.
The dispatcher does the following: If the request URL contains a continuation reference, then it is invoked with the request. Otherwise, url->path is used to resolve the URL to a path. The path is evaluated as a module, in a namespace constructed by make-servlet-namespace. If this fails then responders-servlet-loading is used to format a response with the exception. If it succeeds, then start export of the module is invoked. If there is an error when a servlet is invoked, then responders-servlet is used to format a response with the exception.
Servlets that do not specify timeouts are given timeouts according to timeouts-default-servlet.