diff --git a/collects/web-server/docs/reference/servlet-env.scrbl b/collects/web-server/docs/reference/servlet-env.scrbl index 44fb75bbf0..0dee8f7ea2 100644 --- a/collects/web-server/docs/reference/servlet-env.scrbl +++ b/collects/web-server/docs/reference/servlet-env.scrbl @@ -16,10 +16,12 @@ as well as the following: By default this is from @scheme[(lib "sendurl.ss" "net")]. } -@defform[(on-web servlet-expr)]{This expands to @scheme[(on-web 8000 servlet-expr)].} +@defform*[[(on-web servlet-expr) + (on-web port servlet-expr)]]{ -@defform[(on-web port servlet-expr)]{ - This constructs a small servlet, where the body of the @scheme[start] procedure is + The first form expands to @scheme[(on-web 8000 servlet-expr)]. + + Constructs a small servlet, where the body of the @scheme[start] procedure is @scheme[servlet-expr], runs the @web-server on port @scheme[port], and calls @scheme[send-url] with a URL for the constructed servlet. The call blocks until the servlet finishes its computation, i.e. @scheme[servlet-expr] is evaluated, and diff --git a/collects/web-server/docs/reference/servlet.scrbl b/collects/web-server/docs/reference/servlet.scrbl index ceae623327..829933672d 100644 --- a/collects/web-server/docs/reference/servlet.scrbl +++ b/collects/web-server/docs/reference/servlet.scrbl @@ -21,26 +21,18 @@ A @defterm{servlet} is a module that provides the following: to. This influences the other provided identifiers. } -If @scheme[interface-version] is @scheme['v1], then the servlet -provides: - @defthing[timeout integer?]{ + Only if @scheme[interface-version] is @scheme['v1]. + This number is used as the @scheme[continuation-timeout] argument to a timeout-based continuation manager used for this servlet. (See @secref["timeouts.ss"].) (i.e., you do not have a choice of the manager for this servlet and will be given a timeout-based manager.) } -@defproc[(start [initial-request request?]) - response?]{ - This function is called when an instance of this servlet is started. - The argument is the HTTP request that initiated the instance. -} - -If @scheme[interface-version] is @scheme['v2], then the servlet -provides: - @defthing[manager manager?]{ + Only if @scheme[interface-version] is @scheme['v2]. + The manager for the continuations of this servlet. } @@ -336,7 +328,8 @@ servlet developer. @defthing[see-other redirection-status?]{A @scheme[redirection-status?] for "see-other" redirections.} @defproc[(with-errors-to-browser [send/finish-or-back (response? . -> . void?)] - [thunk (-> any)])]{ + [thunk (-> any)]) + any]{ Calls @scheme[thunk] with an exception handler that generates an HTML error page and calls @scheme[send/finish-or-back]. }