Thanks for reading the API for me.
I should have done that and was clearly wrong.
:-)

-stephan

At 22:28 14.07.00 +0200, Christian Sell wrote:
>not quite. Going to another application is done via
>ServletContext.getContext(). This is from the api docs for
>getRequestDispatcher:
>
>"The pathname must begin with a "/" and is interpreted as relative to the
>current context root. Use getContext to obtain a RequestDispatcher for
>resources in foreign contexts. This method returns null if the
>ServletContext cannot return a RequestDispatcher"
>
>this is what getContext says:
>
>"This method allows servlets to gain access to the context for various parts
>of the server, and as needed obtain RequestDispatcher objects from the
>context. The given path must be absolute (beginning with "/") and is
>interpreted based on the server's document root. "
>
>strange, though that they would call a path absolute that starts with "/".
>Anyway, in case of sendRedirect (and everywhere else unless otherwise
>mentioned, as Magnus said) I vote for "context root relative"
>
>
>-----Original Message-----
>From: Stephan Schmidt <[EMAIL PROTECTED]>
>To: Orion-Interest <[EMAIL PROTECTED]>
>Date: Samstag, 15. Juli 2000 04:00
>Subject: Re: sendRedirect in orion and jrun
>
>
> >Hi,
> >
> >I think Orion is wrong (if expands / to your relative directory)
> >
> >http://www.foobar.com/bar/
> >
> >"/" should expand to http://www.foobar.com
> >"" should expand to http://www.foobar.com/bar
> >"/bar" should expand to http://www.foobar.com/bar
> >
> >if you can't expand to other things than "/" -> "/bar", you cannot
> >redirect to another application directory on your server.
> >
> >-stephan
> >
> >At 11:18 14.07.00 -0500, you wrote:
> >I'm struggling with this too. Tomat does what JRun does, interprets
>relative
> >URLs as arelative to the root rather than the the context. I think Orion's
> >implementation makes more sense, but the spec is unclear. It simply says
> >that relative URLs must be translated to abosolute URLs, that's all.
> >
> >If Tomcat is the reference implementation, then by definition it is
>"right",
> >even if it's wrong. That being said, unless Tomcat changes itself,
>shouldn't
> >Orion follow suite?.
> >
> >--
> >Duane Fields
> >[EMAIL PROTECTED]
> >Managing Engineer, Web Development
> >
> >
> >----- Original Message -----
> >From: ""Jen Hsien Huang"" <[EMAIL PROTECTED]>
> >Newsgroups: uo.listserv.orion
> >Sent: Friday, July 14, 2000 10:33 AM
> >Subject: RE: sendRedirect in orion and jrun
> >
> >
> > > Of cause, since API says server will resolve relative, so Orion is
>right.
> > >
> > > -----Original Message-----
> > > From: [EMAIL PROTECTED] [mailto:owner-]On Behalf Of
> >Christian Sell
> > > Sent: Friday, July 14, 2000 7:43 PM
> > > To: Orion-Interest
> > > Subject: sendRedirect in orion and jrun
> > >
> > >
> > > from within a servlet, i am making the following call:
> > >
> > > response.sendRedirect("/");
> > >
> > > interesting thing: in orion, this takes me back to the context root of
>the
> > > web application. In JRun 3.0, it takes me to the root of the web server.
> >As
> > > far as I can see, the API docs say that the server will resolve relative
> > > URLs, but which one is right in this case?
> > >
> > > Christian Sell
> > >
> >
> >


Reply via email to