You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Marten Lehmann <le...@cnm.de> on 2005/07/24 21:02:21 UTC

how to get the original requestURI after jsp:forward()

Hello,

I have a forward to a jsp-file. This jsp-file needs to know which URI 
was requested in the initial request. Currently, I can only see the 
requestURI of the forwarded jsp-file. Any ideas?

Regards
Marten

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


Re: how to get the original requestURI after jsp:forward()

Posted by Martin Bromley <ma...@sustainable-energy.co.uk>.
I've needed to do this in the past: I created a filter that set the set the requestURI in an attribute in the request.  There may be a better way.

Martin

Marten Lehmann wrote:
> Hello,
> 
> I have a forward to a jsp-file. This jsp-file needs to know which URI 
> was requested in the initial request. Currently, I can only see the 
> requestURI of the forwarded jsp-file. Any ideas?
> 
> Regards
> Marten
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 

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


Re: how to get the original requestURI after jsp:forward()

Posted by Marten Lehmann <le...@cnm.de>.
Hi,

> You need to read SRV.8.4 of the servlet specification.

I read it now. However, it's stated there, that path-related-values 
should be overwritten by the container in all request-dispatcher 
occurences. This means: include and forward. But for an include, I can 
see the original requestURI, for an forward, I see the "local" one. Is 
there any way to obtain the original one? Unfortunately, there's nothing 
like request.getSuper().getRequestURI() or similar. Are all references 
to previous objects cutted?

Regards
Marten

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


Re: how to get the original requestURI after jsp:forward()

Posted by Mark Thomas <ma...@apache.org>.
You need to read SRV.8.4 of the servlet specification.

Mark

Marten Lehmann wrote:
> Hello,
> 
> I have a forward to a jsp-file. This jsp-file needs to know which URI 
> was requested in the initial request. Currently, I can only see the 
> requestURI of the forwarded jsp-file. Any ideas?
> 
> Regards
> Marten
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 
> 



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


AW: how to get the original requestURI after jsp:forward()

Posted by Schwarz <sc...@power-netz.de>.
> 
> Hello,
> 
> I have a forward to a jsp-file. This jsp-file needs to know which URI 
> was requested in the initial request. Currently, I can only see the 
> requestURI of the forwarded jsp-file. Any ideas?

set a session bean with the original uri.


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