5.13 Serving Web Language Servlets
The web-server/dispatchers/dispatch-lang module defines a dispatcher constructor that runs servlets written in the Web Language.
| ||||||||||||||||
url->path : url->path? | ||||||||||||||||
| ||||||||||||||||
responders-servlet-loading : servlet-loading-responder | ||||||||||||||||
responders-servlet : (gen-servlet-responder "servlet-error.html") |
If the request URL contains a serialized continuation, 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.