[plt-scheme] getting webserver URL arguments

From: Stephen DeGabrielle (spdegabrielle at gmail.com)
Date: Tue Apr 5 10:16:02 EDT 2005

Hi,
I am trying to extract arguments from a url of a servlet
eg http://127.0.0.1:8080/servlets/test?name=stephen
where the URL is generated by another server 

using              (p ,(extract-bindings name))))))
I hoped to get the value 'stephen' from the arg 'name'

 I can't seem to work out what I am doing wrong from the docs, or the
list archives.
My 'test' scheme servlet follows;

Any assisistance is appreciated, 

Regards, 

Stephen

---

(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 name))))))


---
PS I am student but Scheme is not part of the curriculum at my
university (cdu.edu.au)

Stephen



Posted on the users mailing list.