struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Jouravlev" <jmi...@gmail.com>
Subject Re: Find out the old url after struts forwarding
Date Wed, 02 Aug 2006 21:44:47 GMT
On 8/2/06, Wbyeats <mario@emmedici.com> wrote:
>
> Hi guys,
>
> I have this problem: I'm using websphere 4, wth JDK 1.3 and J2EE 1.2, and
> struts.
> I have set an action that after doing some coding would forward
> (redirect=false) to a jsp. In the browser url I correctly see the .do url.
>
> If in that page I ask for a request.getRequestURI() I get the url of the new
> jsp. How should I find out the old .do url as the request is still the same?

request.getRequestURL() work for me, returning full URL including
"http" and port number. If you need URI only, use
request.getAttribute("javax.servlet.forward.request_uri")

http://www.javaworld.com/javaworld/jw-03-2003/jw-0328-servlet_p.html

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message