[plt-scheme] getting webserver URL arguments

From: Stephen DeGabrielle (spdegabrielle at gmail.com)
Date: Tue Apr 5 12:27:18 EDT 2005

I made the change you suggested - but it's still choking with the; 
> Servlet didn't load. expand: unbound variable in module
error (in the browser)

It doesn't seem to be coping with 'extract-bindings' after the comma

Thanks again for the quickness of your replies. 

(going to bed as it is 2am here) 

(module test mzscheme
 (provide interface-version timeout start)

 (define interface-version 'v1)

 (define timeout +inf.0)

 ; start : request -> response
 (define (start initial-request)
   `(html (head (title "A Test Page"))
          (body ([bgcolor "white"])
                (p ,(extract-bindings (request-bindings
initial-request) 'name))))))

-other servlet code style-
gives this error "Error : The servlet terminated abnormally."
(require (lib "unitsig.ss")
         (lib "servlet-sig.ss" "web-server"))

(unit/sig () (import servlet^)
  (define the-text "Hello, Web!")
  `(html (head (title ,the-text))
         (body ([bgcolor "white"])
               (p ,the-text)
               (p ,(extract-bindings (request-bindings initial-request) 'name))
               (p ,the-text)
--end code-

On Apr 6, 2005 12:55 AM, Noel Welsh <noelwelsh at yahoo.com> wrote:
> --- Stephen DeGabrielle <spdegabrielle at gmail.com> wrote:
> > Thank you for such a quick response - I am still getting
> > the same
> > problem I think:
> >
> > I tried http://localhost:8080/servlets/test.scm?name=234
> > and got this error from the browser;
> > > Servlet didn't load. expand: unbound variable in module
> I made a typo.  It should be request-bindings, not
> require-bindings.
> HTH,
> Noel
> Email: noelwelsh <at> yahoo <dot> com
> AIM: noelhwelsh
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com



Stephen De Gabrielle
-- http://users.bigpond.com/spdegabrielle/automata

Posted on the users mailing list.