value
procedure
path->serlvet)url->path:url->path/cpath->serlvet:path->servlet/c
The second return value 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.
Changed in version 1.3 of package web-server-lib: Added optional argument to first return value for list of URLs.
Changed in version 1.3: Added optional argument to first return value for servlet finalizer procedure.
procedure
[ #:responders-servlet-loadingresponders-servlet-loading#:responders-servletresponders-servlet])→dispatcher/curl->servlet:url->servlet/c
procedure
( make-v1.servlet directorytimeoutstart)→servlet?
directory:path-string?timeout:integer?
procedure
( make-v2.servlet directorymanagerstart)→servlet?
directory:path-string?manager:manager?
procedure
stuffermanagerdirectory:path-string?manager:manager?
value
value
procedure
[ #:make-servlet-namespacemake-servlet-namespace#:timeouts-default-servlettimeouts-default-servlet])make-servlet-namespace : make-servlet-namespace/c
procedure
( make-make-servlet-namespace #:to-be-copied-module-specsto-be-copied-module-specs)
#:to-be-copied-module-specs`((lib"database.rkt""my-module")))
A different namespace is needed for each servlet, so that if servlet A and servlet B both use a stateful module C, they will be isolated from one another. We see the Web Server as an operating system for servlets, so we inherit the isolation requirement on operating systems.
However, there are some modules which must be shared. If they were not, then structures cannot be passed from the Web Server to the servlets, because Racket’s structures are generative.
Since, on occasion, a user will actually wanted servlets A and B to interact through module C. A custom make-servlet-namespace can be created, through this procedure, that attaches module C to all servlet namespaces. Through other means (see Dispatchers) different sets of servlets can share different sets of modules.
#:extra-constructor-namemake-servlet#:mutable)custodian:custodian?namespace:namespace?manager:manager?directory:path-string?