On this page:
url->servlet/ c
make-cached-url->servlet
make
Version: 4.1.4
3.3.12 Serving Servlets

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

The web-server/dispatchers/dispatch-servlets module defines a dispatcher constructor that runs servlets.

url->servlet/c : contract?

Equivalent to (-> url? servlet?)

(make-cached-url->servlet url->path 
  path->serlvet) 
  
(-> void) url->servlet/c
  url->path : url->path/c
  path->serlvet : path->servlet/c

The first return value flushes the cache. The second is a procedure that uses url->path to resolve the URL to a path, then uses path->servlet to resolve that path to a servlet, caching the results in an internal table.

(make url->servlet 
  [#:responders-servlet-loading responders-servlet-loading 
  #:responders-servlet responders-servlet]) 
  dispatcher/c
  url->servlet : url->servlet/c
  responders-servlet-loading : (url? exn? . -> . response?)
   = servlet-loading-responder
  responders-servlet : (url? exn? . -> . response?)
   = servlet-error-responder

This dispatcher runs Scheme servlets, using url->servlet to resolve URLs to the underlying servlets. If servlets have errors loading, then responders-servlet-loading is used. Other errors are handled with responders-servlet. If a servlet raises calls next-dispatcher, then the signal is propagated by this dispatcher.