[plt-scheme] help with stateless servlets

From: Holden Karau (holden at pigscanfly.ca)
Date: Sat Jul 4 22:59:06 EDT 2009

I'm having some difficulty creating/launching a stateless servlet
When I run the following code I get back "procedure
make-stateless.servlet: expects 4 arguments, given 3:
#<path:/usr/lib/plt/collects/web-server/default-web-root/htdocs>
#<stuffer> #<procedure:.../servlet-dispatch.ss:26:21>"
yousseb.ss defines & exports start, manager & stuffer for good measure
(although I already pass manager & stuffer in as paramaters to
serve/servlet )
I assume I've missed something completely obvious to make this work, what is it?
#lang scheme
(require "mypath.ss")
(require web-server/servlet-env)
(require web-server/configuration/responders)
(require web-server/managers/lru)
(require "youuseb.ss")
(require web-server/stuffers/base64)
(require web-server/stuffers)
(require web-server/stuffers/hmac-sha1)
(define exp  (lambda (req)
    `(html (head (title "Expired"))
           (body (h1 "Expired")
                 (p "This URL has expired. "
                    "Please return to the home page."
		     "This is likely because of increased load. It shouldn't happen
again." )))) )
(define use 2)
(define mystuffer
   (stuffer-chain
    serialize-stuffer
    (md5-stuffer (build-path "/tmp/" ".urls"))))

(define mymanager (make-threshold-LRU-manager exp	2524000000))

(serve/servlet start
               #:launch-browser? #f
               #:quit? #f
	       #:file-not-found-responder (gen-file-not-found-responder
(build-path "/usr/src/awesome/static" "404.html"))
	       #:log-file  "/usr/src/awesome/mylog4"
	       #:log-format 'extended
               #:listen-ip #f
	       #:manager mymanager
               #:port 8085
	       #:stuffer mystuffer
	       #:command-line? #t
               #:extra-files-paths
               (list (build-path mypath "static"))
               #:servlet-path "/app/"
	       #:stateless? #t)


Posted on the users mailing list.