On a Servlet 2.4 container (such as Tomcat 5.x), the server will store
the "original" path-related information as a set of request attributes
with well known names:

  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

On a pre-2.4 container, you'll need to save the values yourself prior
to performing the forward.

Craig



On Tue, 5 Oct 2004 15:26:55 +0000 (UTC), Jacob Weber
<[EMAIL PROTECTED]> wrote:
> Hello. In my Struts application, I have an action which forwards to a second
> action. The "redirect" parameter is set to false, so the browser's URL doesn't
> change.
> 
> I'd like to get the original URL that the user requested (the one that's in his
> browser). But request.getServletPath() and the various other request methods
> return the URL of the second action. One method, getRequestURL(), seems to
> return the original URL, but this only works on Tomcat. On WebLogic, it returns
> the second one.
> 
> Is there a reliable way to get this information? Thanks,
> Jacob
> 
> ---------------------------------------------------------------------
> 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]

Reply via email to