<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><blockquote type="cite"><div>(serve/servlet start #:launch-browser #f #:port 80 #:servlet-path (string->path "/code.ss"))<br><br>---><br><br>Servlet (@ /servlets/code.ss) didn't load:<br>build-path: absolute path "/code.ss" cannot be added to a path<br></div></blockquote><br></div><div>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.</div><div><br></div><div>Say you have a servlet function that you want on the URL "<a href="http://localhost:8000/foo">http://localhost:8000/foo</a>". You also have a directory called "htdocs/stylesheets" containing a bunch of CSS files. You might write your call to serve/servlet as follows:</div><div><br></div><div><span class="Apple-style-span" style="font-family: Monaco; "> (serve/servlet</span></div><div><font class="Apple-style-span" face="Monaco"> start</font></div><div><font class="Apple-style-span" face="Monaco"> #:port 8000</font></div><div><font class="Apple-style-span" face="Monaco"> #:servlet-path "/foo"</font></div><div><font class="Apple-style-span" face="Monaco"> #:extra-files-paths (list (build-path "htdocs")))</font></div><div><br></div><div>The web server sends all requests to "/foo" to your servlet and serves all other URLs out of your static content directory:</div><div><br></div><div><font class="Apple-style-span" face="Monaco"> <a href="http://localhost:8000/foo">http://localhost:8000/foo</a> ==> servlet</font></div><div><font class="Apple-style-span" face="Monaco"> <a href="http://localhost:8000/stylesheets/bar.css">http://localhost:8000/stylesheets/bar.css</a> ==> htdocs/stylesheets/bar.css</font></div><div><font class="Apple-style-span" face="Monaco"> etc...</font></div><div><br></div><div>Hope this helps,</div><div><br></div><div>-- Dave</div></body></html>