Web Server: PLT HTTP Server

1`` | Running the Web Server
2`` | Scheme Servlets
3`` | Web Language Servlets
4`` | Configuration
5`` | Dispatchers
6`` | Web Config Unit
7`` | Web Server Unit
8`` | Continuation Managers
9`` | Internal
10`` | Troubleshooting
11`` | Acknowledgements
| Index

On this page:

make

Version: 4.0.2
contents index
← prev up next →

#### 5.13`` Serving Web Language Servlets

(require web-server/dispatchers/dispatch-lang)

The web-server/dispatchers/dispatch-lang module defines a dispatcher constructor that runs servlets written in the Web Language.

(make |  | #:url->path url->path |
| [ | #:make-servlet-namespace make-servlet-namespace] |
|  | #:responders-servlet-loading responders-servlet-loading |
|  | #:responders-servlet responders-servlet) |

→ dispatcher?
url->path : url->path?

| make-servlet-namespace |  | : |  | make-servlet-namespace?
|  |  | = |  | (make-make-servlet-namespace)

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.

contents index
← prev up next →