You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Igor Vaynberg (JIRA)" <ji...@apache.org> on 2010/02/05 03:46:28 UTC

[jira] Resolved: (WICKET-2714) SharedResourceRequestTarget sets Status 404 when not found, ignoring any 404 settings

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

Igor Vaynberg resolved WICKET-2714.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.4.7
         Assignee: Igor Vaynberg

> SharedResourceRequestTarget sets Status 404 when not found, ignoring any 404 settings
> -------------------------------------------------------------------------------------
>
>                 Key: WICKET-2714
>                 URL: https://issues.apache.org/jira/browse/WICKET-2714
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.3
>            Reporter: Matthias Keller
>            Assignee: Igor Vaynberg
>             Fix For: 1.4.7
>
>
> In SharedResourceRequestTarget, Line 186, the code just sets the 404 status when the requested resource was not found which defeats all page not found settings and tomcat error settings:
> 	((WebResponse)response).getHttpServletResponse().setStatus(
> 		HttpServletResponse.SC_NOT_FOUND);
> We've got in Application:
> 		mountBookmarkablePage("/error/notfound", NotFoundErrorPage.class);
> And in the app's web.xml:
> 	<error-page>
> 		<error-code>404</error-code>
> 		<location>/error/notfound</location>
> 	</error-page>
> This works for other cases, but not for this. Probably instead of setStatus a sendError or something like that should be done?
> Ways to reproduce:
> Create an error page and mount it like shown above. Also add the error-page entry to the web.xml
> Now try to access  http://host/app/resources/x.y.z  (thus requesting the resource  x.y.z)
> What happens: The ugly default tomcat error page is displayed
> What should have happened: The page configured as 404 page should be displayed

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