[ 
https://issues.apache.org/struts/browse/WW-3192?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jasper Rosenberg resolved WW-3192.
----------------------------------

    Resolution: Fixed

I just retested, and it looks like the issue was actually fixed in 2.1.7 (and 
therefore 2.1.8) by passing forceLookup = true

> When struts is used to render an error-page, getting the action mapping from 
> original request
> ---------------------------------------------------------------------------------------------
>
>                 Key: WW-3192
>                 URL: https://issues.apache.org/struts/browse/WW-3192
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Dispatch Filter
>    Affects Versions: 2.1.6
>         Environment: Tomcat 
>            Reporter: Jasper Rosenberg
>            Priority: Critical
>             Fix For: 2.1.8
>
>
> We have mapped 404 in the web.xml to a struts action, e.g.:
>   <error-page>
>     <error-code>404</error-code>
>     <location>/404.action</location>
>   </error-page> 
> Sometimes we have an action return a result type to generate a 404 error. 
> This used to work.  However, now it is failing because 
> PrepareOperations.findActionMapping() is finding the original mapping still 
> in the request when the servlet container invokes the 404.action (and so not 
> getting the struts mapping for the 404 action).   I assume this is also a bug 
> for actions that return a 500 error where the 500 error page is rendered in 
> struts though I haven't tested it yet.
> One fix would be to call request.removeAttribute(STRUTS_ACTION_MAPPING_KEY) 
> at the end of  PrepareOperations.cleanupRequest() though perhaps there are 
> implications to that I'm unaware of.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to