No subject

From: ()
Date: Fri Jul 13 09:02:16 EDT 2012

requests to responses. If you use serve/servlet, there's no reason that the
'start' function you give it can't dispatch to many things that you think
of as independent servlets:

(define-values (top-dispatch top-url)
 (dispatch-rules
  [("cats" (string-arg) ...] goto-cat-servlet]
  [("dogs" (string-arg) ...] goto-dog-servlet]))

(define (goto-cat-servlet req args)
 (cat-servlet req))

etc

Additionally, if you use the command line tool, 'plt-web-server', then
servlets will be read, cgi-bin-style, from a directory you name in a
configuration file. This same functionality is available with the
'servlets-root' argument to serve/servlet.

Jay


On Fri, Nov 2, 2012 at 4:50 PM, Kejia=E6=9F=AF=E5=98=89 <w.kejia at gmail.com>=
 wrote:

> hi all,
>
> i read several examples showing how to deploy a servlet in a racket web
> server, but none mentions how to run multiple ones at a time. so, racket'=
s
> web application model appeals single-servlet services?
>
> ``
> (serve/servlet start #:listen-ip #f #:port 8080)
> ''
>
> -------------
> kejia
>
> =E2=98=B5=E2=98=AF=E2=98=B2
>
>
> ____________________
>   Racket Users list:
>   http://lists.racket-lang.org/users
>
>


--=20
Jay McCarthy <jay at cs.byu.edu>
Assistant Professor / Brigham Young University
http://faculty.cs.byu.edu/~jay

"The glory of God is Intelligence" - D&C 93

--047d7bdc96948df09a04cd98410f
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable


Posted on the users mailing list.