<div dir="ltr">A user goes to the URL <br><br><a href="http://server/path/to/servlet.ss/something/else/afterwards">http://server/path/to/servlet.ss/something/else/afterwards</a><br><br>I want to know <br><br>1) /path/to/servlet.ss as the virtual path for the servlet <br>
<br>so I can calculate <br><br>2) /sometihng/else/afterwards as the path info <br><br>`this-expression-file-name` doesn't tell me how many levels down is the server's root directory, so it's a bit more difficult to do relative path calculation. <br>
<br>Thanks,<br>yc<br><br><div class="gmail_quote">On Fri, Oct 3, 2008 at 2:29 PM, Jay McCarthy <span dir="ltr"><<a href="mailto:jay.mccarthy@gmail.com">jay.mccarthy@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
A user goes to the URL<br>
<br>
<a href="http://server/path/to/servlet.ss" target="_blank">http://server/path/to/servlet.ss</a><br>
<br>
and you want<br>
<br>
servlet.ss<br>
<br>
Isn't that this-expression-file-name?<br>
<br>
<a href="http://docs.plt-scheme.org/mzlib/mzlib_etc.html#%28form._%28%28lib._mzlib/etc..ss%29._this-expression-file-name%29%29" target="_blank">http://docs.plt-scheme.org/mzlib/mzlib_etc.html#(form._((lib._mzlib/etc..ss)._this-expression-file-name))</a><br>
<font color="#888888"><br>
Jay<br>
</font><div><div></div><div class="Wj3C7c"><br>
On Fri, Oct 3, 2008 at 11:31 AM, YC <<a href="mailto:yinso.chen@gmail.com">yinso.chen@gmail.com</a>> wrote:<br>
> This is a new issue after I switched the config table, because I made use of<br>
> the `default-configuration-table-path`, sorry for the confusion.<br>
><br>
> What I am doing is calculating the path in the url that belongs to the<br>
> servlet's name (and the part that doesn't belong). The hack I came up with<br>
> basically made use of `make-url->path` & `make-url->valid-path` to derive<br>
> the paths, and the only path that I can pass to `make-url->path` was the<br>
> `default-configuration-table-path`, but this appears to be hard coded.<br>
><br>
> If there are other ways to achieve what I am doing that would work as well.<br>
><br>
> Thanks,<br>
> yc<br>
><br>
> On Fri, Oct 3, 2008 at 5:08 AM, Jay McCarthy <<a href="mailto:jay.mccarthy@gmail.com">jay.mccarthy@gmail.com</a>> wrote:<br>
>><br>
>> I'm confused. You want your servlet to know what the configuration<br>
>> table the server was run with?<br>
>><br>
>> Jay<br>
>><br>
><br>
><br>
<br>
<br>
<br>
</div></div><div><div></div><div class="Wj3C7c">--<br>
Jay McCarthy <<a href="mailto:jay@cs.byu.edu">jay@cs.byu.edu</a>><br>
Assistant Professor / Brigham Young University<br>
<a href="http://jay.teammccarthy.org" target="_blank">http://jay.teammccarthy.org</a><br>
<br>
"The glory of God is Intelligence" - D&C 93<br>
</div></div></blockquote></div><br></div>