Both Craig and Yoge's suggestions work fine, so thanks to you both. I'm
going to include Yoge's for backwards compat, and make it set all of
Craig's variables.
Possibly something for Commons-Filters package which is hiding in cvs :)
Now to see what happens to the http-referrer header during forwarding.
Hen
On Thu, 4 Mar 2004, Craig R. McClanahan wrote:
> Quoting yoge <[EMAIL PROTECTED]>:
>
> > Dear Hen,
> >
> > Write a servletFilter and include the below code snippet in your
> > doFilter method
> >
> > *String uri=(String)((HttpServletRequest)request).getAttribute("uri");
> > if(uri==null)
> > {
> > System.out.println("Inside uri==null ");
> > String
> > requestURL=((HttpServletRequest)request).getRequestURI();
> >
> > ((HttpServletRequest)request).setAttribute("uri",requestURL);
> >
> > }*
> >
> > Then u can get the requestURL in the jsp using request.getAttribute("uri");
> >
>
> This technique works fine. In a Servlet 2.4 environment (Tomcat 5 or later)
> environment, however, it is unnecessary ... when the Struts controller servlet
> executes the RequestDispatcher.forward() call, the servlet container will
> create request attributes under the following keys, to capture the path
> elements of the original request (rather than the new request):
>
> * javax.servlet.forward.request_uri
> * javax.servlet.forward.context_path
> * javax.servlet.forward.servlet_path
> * javax.servlet.forward.path_info
> * javax.servlet.forward.query_string
>
> For more info, see Section SRV.8.4.2 of the Servlet 2.4 spec.
>
> > --Thanks
> > Yogendrababu
> >
>
> Craig
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]