[plt-scheme] change default-web-root to a different path

From: YC (yinso.chen at gmail.com)
Date: Fri Oct 3 17:41:33 EDT 2008

A user goes to the URL

http://server/path/to/servlet.ss/something/else/afterwards

I want to know

1) /path/to/servlet.ss as the virtual path for the servlet

so I can calculate

2) /sometihng/else/afterwards as the path info

`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.

Thanks,
yc

On Fri, Oct 3, 2008 at 2:29 PM, Jay McCarthy <jay.mccarthy at gmail.com> wrote:

> A user goes to the URL
>
> http://server/path/to/servlet.ss
>
> and you want
>
> servlet.ss
>
> Isn't that this-expression-file-name?
>
>
> http://docs.plt-scheme.org/mzlib/mzlib_etc.html#(form._((lib._mzlib/etc..ss)._this-expression-file-name))<http://docs.plt-scheme.org/mzlib/mzlib_etc.html#%28form._%28%28lib._mzlib/etc..ss%29._this-expression-file-name%29%29>
>
> Jay
>
> On Fri, Oct 3, 2008 at 11:31 AM, YC <yinso.chen at gmail.com> wrote:
> > This is a new issue after I switched the config table, because I made use
> of
> > the `default-configuration-table-path`, sorry for the confusion.
> >
> > What I am doing is calculating the path in the url that belongs to the
> > servlet's name (and the part that doesn't belong).  The hack I came up
> with
> > basically made use of `make-url->path` & `make-url->valid-path` to derive
> > the paths, and the only path that I can pass to `make-url->path` was the
> > `default-configuration-table-path`, but this appears to be hard coded.
> >
> > If there are other ways to achieve what I am doing that would work as
> well.
> >
> > Thanks,
> > yc
> >
> > On Fri, Oct 3, 2008 at 5:08 AM, Jay McCarthy <jay.mccarthy at gmail.com>
> wrote:
> >>
> >> I'm confused. You want your servlet to know what the configuration
> >> table the server was run with?
> >>
> >> Jay
> >>
> >
> >
>
>
>
> --
> Jay McCarthy <jay at cs.byu.edu>
> Assistant Professor / Brigham Young University
> http://jay.teammccarthy.org
>
> "The glory of God is Intelligence" - D&C 93
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20081003/8c63a16f/attachment.html>

Posted on the users mailing list.