[plt-scheme] pretty URLs

From: maxigas (maxigas at anargeek.net)
Date: Sun Dec 28 19:49:22 EST 2008

From: Dave Gurnell <d.j.gurnell at gmail.com>
>     (serve/servlet start #:launch-browser #f #:port 80 #:servlet-path (string->path "/code.ss"))
>    
>     --->
>    
>     Servlet (@ /servlets/code.ss) didn't load:
>     build-path: absolute path "/code.ss" cannot be added to a path
> 
> The #:servlet-path argument refers to the local URL of the servlet. It should be a string rather than a path object. This is
> different to the #:extra-files-paths and #:mime-types-path arguments, which refer to paths on your local filesystem.

OK, it works!  But it's a path.  I guess this is either a mistake in the documentation or a bug
(probably the latter).  I made 2 mistakes, however, when i was trying to make it work:

- the keyword is "#:launch-browser?" not "#:launch-browser".

- i launched code.ss from the browser, just trying to access the URL while an instance of
  plt-web-server was running.  however, the correct was to lauch it is as a command line argument
  for mzscheme: "root at machine: mzscheme code.ss".  note: this is also better for testing because
  you don't have to visit the refresh-servlets page all the time you alter code.

ps: i think i had the same mzscheme before but the version output was also buggy:

before: 
root at bubble: /usr/local/plt/bin/mzscheme -v 
Welcome to MzScheme v4.1.1.3 [3m], Copyright (c) 2004-2008 PLT Scheme Inc.

after i compiled the latest stabel version from plt-scheme.org:
Welcome to MzScheme v4.1.3 [3m], Copyright (c) 2004-2008 PLT Scheme Inc.a

--> so maybe there was a mere typo, an extra "1." in the first case.

maxigas


Posted on the users mailing list.