You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2012/07/02 14:12:22 UTC

[jira] [Resolved] (WICKET-4634) UrlRenderer / Problem with rendering of relative URLs on error page

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

Martin Grigorov resolved WICKET-4634.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.5.8
                   6.0.0-RC1
         Assignee: Martin Grigorov
    
> UrlRenderer / Problem with rendering of relative URLs on error page
> -------------------------------------------------------------------
>
>                 Key: WICKET-4634
>                 URL: https://issues.apache.org/jira/browse/WICKET-4634
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5.7
>         Environment: ubuntu 12.04 / tomcat 6 / jetty 7.5
>            Reporter: Mykhaylo Rubezhanskyy
>            Assignee: Martin Grigorov
>             Fix For: 6.0.0-RC1, 1.5.8
>
>         Attachments: wicket-bugreport.tar.gz
>
>
> There is some resource on the error page (NotFoundErrorPage), in my example (attached to this ticket) it is an image. When the page is called directly using mounted page name, the image is shown correctly.
> The page is mapped in web.xml as an 404 – error page and could be invoked indirectly, when the customer types some wrong URL inside wicket filter. In this case, the image is not shown because parsed html it is linked with wrong URL.
> I have debugged the problem until org.apache.wicket.request.UrlRenderer class renderRelativeUrl() method.  In this method the relative URL of the image is parsed incorrectly.
> Important requirements to reproduce the bug:
> Wicket filter is mapped to non-root url-pattern (in the case of root mapping the bug could not be reproduced):
> (web.xml)
> 	<filter-mapping>
> 		<filter-name>wicket.bugreport</filter-name>
> 		<url-pattern>/testapp/*</url-pattern>
>         <!-- Also added request and error dispatchers  -->
>         <dispatcher>REQUEST</dispatcher>
>         <dispatcher>ERROR</dispatcher>
> 	</filter-mapping>
>     <!-- Added mapping of 404 error page to the scope of "testapplicaiton" filter  -->
>     <error-page>
>    		<error-code>404</error-code>
>    		<location>/testapp/error404</location>
>    	</error-page>
> Direct call of error page, image is shown:
> http://localhost:8080/somelocation/testapp/error404
> Call throw servlet error mapper, image is not shown:
> http://localhost:8080/somelocation/testapp/blablabla/hugo
> Example is attached!

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira