<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&nbsp;"<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; ">&nbsp;&nbsp; &nbsp;(serve/servlet</span></div><div><font class="Apple-style-span" face="Monaco">&nbsp;&nbsp; &nbsp; start</font></div><div><font class="Apple-style-span" face="Monaco">&nbsp;&nbsp; &nbsp; #:port &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;8000</font></div><div><font class="Apple-style-span" face="Monaco">&nbsp;&nbsp; &nbsp; #:servlet-path &nbsp; &nbsp; &nbsp;"/foo"</font></div><div><font class="Apple-style-span" face="Monaco">&nbsp;&nbsp; &nbsp; #: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">&nbsp;&nbsp; &nbsp;<a href="http://localhost:8000/foo">http://localhost:8000/foo</a> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;==> &nbsp; &nbsp;servlet</font></div><div><font class="Apple-style-span" face="Monaco">&nbsp;&nbsp; &nbsp;<a href="http://localhost:8000/stylesheets/bar.css">http://localhost:8000/stylesheets/bar.css</a> &nbsp; &nbsp;==> &nbsp; &nbsp;htdocs/stylesheets/bar.css</font></div><div><font class="Apple-style-span" face="Monaco">&nbsp;&nbsp; &nbsp;etc...</font></div><div><br></div><div>Hope this helps,</div><div><br></div><div>-- Dave</div></body></html>