You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by "Erik Pilz (JIRA)" <ji...@apache.org> on 2006/04/28 00:56:18 UTC

[jira] Updated: (WW-1301) UrlHelper doesn't use the original requested URL in a Servlet 2.4 container when the request has been forwarded

     [ http://issues.apache.org/struts/browse/WW-1301?page=all ]

Erik Pilz updated WW-1301:
--------------------------

    Attachment: UrlHelperTest.patch

The attached patch adds two test cases to UrlHelperTest to illustrate the problem. I also have a small webapp that illustrates the issue -- let me know if you'd like me to upload it.

> UrlHelper doesn't use the original requested URL in a Servlet 2.4 container when the request has been forwarded
> ---------------------------------------------------------------------------------------------------------------
>
>          Key: WW-1301
>          URL: http://issues.apache.org/struts/browse/WW-1301
>      Project: Struts Action 2
>         Type: Bug

>   Components: Views
>     Versions: WW 2.1.8, WW 2.2.1, WW 2.2.2
>  Environment: WinXP, Tomcat 5.5.17, J2SE 5.0
>     Reporter: Erik Pilz
>  Attachments: UrlHelperTest.patch
>
> The UrlHelper code uses HttpServletRequest#getRequestURI() to get the URL that the user requested. In a servlet 2.4 container this won't work if the request has been forwarded. In a 2.4 container the call to HttpServletRequest#getRequestURI() will return the URL of the forwarded page. The UrlHelper should first try to get the URI from the "javax.servlet.forward.request_uri" request attribute. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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