[plt-scheme] starting 2 servlets at the same time
If you run the CLI it is easy to do this.
If you construct your own dispatcher with the sequence dispatcher and
two dispatch/servlets, it is also easy.
If you use web-server/dispatch, you can run one "servlet" that calls
two different 'start' functions based on the URL, this way is also
easy.
Jay
On Wed, Sep 23, 2009 at 5:20 AM, vannadiz <vika.lapsar at gmail.com> wrote:
> I have 2 servlets.
> Servlet1
> #:servlet-path "/servlet1"
>
> Servlet2
> #:servlet-path "/servlet2"
>
> I need to run them simultaneously.
> I mean when i try to access http://localhost:8000//servlet1 servlet1
> should process the request. And vice versa, when i access
> http://localhost:8000//servlet2 servlet2 should process the request.
> But now i can run either 1 or 2.
>
> Sorry for dummy question. Thanks.
>
> servlet sample below
> #lang scheme
> (require web-server/servlet-env)
> (require web-server/servlet)
>
> (define (start1 request)
> '(html
> (body "Servlet1")))
>
> (serve/servlet start1
> #:launch-browser? #t
> #:quit? #f
> #:listen-ip #f
> #:port 8000
> #:extra-files-paths
> (list (build-path my-path "htdocs"))
> #:servlet-path
> "/servlet1" )
> _________________________________________________
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
--
Jay McCarthy <jay at cs.byu.edu>
Assistant Professor / Brigham Young University
http://teammccarthy.org/jay
"The glory of God is Intelligence" - D&C 93