<div class="gmail_quote">Hi,<div><br></div><div>What do I need to do to run a stateless servlet?</div><div><br></div><div>Consider the following example taken from the web tutorial. I just added `#:stateless? #t` while starting.</div>
<div><br></div>
<div><div>#lang racket</div><div>(require web-server/servlet</div><div> web-server/servlet-env)</div><div><br></div><div>; start: request -> response</div><div>(define (start request)</div><div> (show-counter 0 request))</div>
<div><br></div><div>; show-counter: number request -> doesn't</div><div>; Displays a number that's hyperlinked: when the link is pressed,</div><div>; returns a new page with the incremented number.</div><div>(define (show-counter n request)</div>
<div> (send/suspend/dispatch</div><div> (lambda (url)</div><div> (response/xexpr</div><div> `(html (head (title "Counting example"))</div><div> (body</div><div> (a</div>
<div> ([href ,(url</div><div> (lambda (req)</div><div> (show-counter (add1 n) req)))])</div><div> ,(number->string n))))))))</div>
<div><br></div><div>(serve/servlet start</div><div> #:port 7070</div><div> #:servlet-path "/"</div><div> #:listen-ip #f</div></div><div> #:stateless? #t)</div>
<div><br></div><div><br></div><div>This doesn't work. I am looking at the web server reference but I can't find a proper example.</div><div><br></div><div><br></div></div>