You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by August Detlefsen <au...@yahoo.com> on 2001/08/13 19:46:12 UTC
Getting *original* request path
How do I get the original request URI or path after a page has been
forwarded using pageContext.forward()?
The webapp I'm developing uses pageContext.forward() to send requests
to different JSPs for processing (for example to send someone to a
login page if they are not logged in), but once they are forwarded
methods such as:
request.getRequestURI()
request.getServletPath()
HttpUtils.getRequestURL(request)
only return info relevant to the new page.
How do I get the info for the original page?
Thanks,
August
__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/
Re: Getting *original* request path
Posted by August Detlefsen <au...@yahoo.com>.
That's actually what I wound up doing. I just wanted to make sure that
there wasn't a simpler way. It seems to me there should be a method in
the API for just such occasions...
-August
--- "Craig R. McClanahan" <cr...@apache.org> wrote:
>
>
> On Mon, 13 Aug 2001, August Detlefsen wrote:
>
> > How do I get the original request URI or path after a page has been
> > forwarded using pageContext.forward()?
> >
> > The webapp I'm developing uses pageContext.forward() to send
> requests
> > to different JSPs for processing (for example to send someone to a
> > login page if they are not logged in), but once they are forwarded
> > methods such as:
> >
> > request.getRequestURI()
> > request.getServletPath()
> > HttpUtils.getRequestURL(request)
> >
> > only return info relevant to the new page.
> >
> > How do I get the info for the original page?
> >
>
> Save the request URI of the original page in a request attribute
> before
> you do the forwarding.
>
> > Thanks,
> > August
> >
>
> Craig
>
__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/
Re: Getting *original* request path
Posted by "Craig R. McClanahan" <cr...@apache.org>.
On Mon, 13 Aug 2001, August Detlefsen wrote:
> How do I get the original request URI or path after a page has been
> forwarded using pageContext.forward()?
>
> The webapp I'm developing uses pageContext.forward() to send requests
> to different JSPs for processing (for example to send someone to a
> login page if they are not logged in), but once they are forwarded
> methods such as:
>
> request.getRequestURI()
> request.getServletPath()
> HttpUtils.getRequestURL(request)
>
> only return info relevant to the new page.
>
> How do I get the info for the original page?
>
Save the request URI of the original page in a request attribute before
you do the forwarding.
> Thanks,
> August
>
Craig