[plt-scheme] Unexpected error using "static-files-path"

From: Thomas Chust (chust at web.de)
Date: Mon Dec 1 11:08:54 EST 2008

Ferreira Maurizio schrieb:
> [...]
> procedure application: procedure: #<procedure:serve/servlet>;
> does not expect an argument with keyword #:extra-files-path;
> arguments were: #<procedure:start> #:extra-files-path #<path:htdocs>
> #:launch-browser? #t
> [...]

Hello,

a quick glance at the contents of collects/web-server/servlet-env.ss and
at the documentation confirms that from PLT Scheme 4.1.2 to 4.1.3 the
signature of serve/servlet changed.

In version 4.1.2 serve/servlet accepted a keyword parameter
#:extra-files-path with contract path?, in version 4.1.3 the keyword
parameter is now called #:extra-files-paths with contract (listof path?).

However, the change was probably not correctly reflected in the instant
servlet customization API.

You can work around that problem by calling serve/servlet directly from
your code. Replace

  #lang web-server/insta

by

  #lang scheme
  (require web-server/servlet-env)

and add

  (serve/servlet start #:extra-files-paths (list (build-path "htdocs")))

to the bottom of your code.

cu,
Thomas


Posted on the users mailing list.