You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Jean-Baptiste Quenot (JIRA)" <ji...@apache.org> on 2007/06/10 22:39:25 UTC

[jira] Reopened: (WICKET-293) PackageRequestTargetUrlCodingStrategy should interrupts the cycle and sends a 404 when a page/class cannot be found.

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

Jean-Baptiste Quenot reopened WICKET-293:
-----------------------------------------


I don't like the fix as any error during decode() is silently trapped.  When a 404 needs to be sent decode() should handle the case properly and just return null.  We should not catch any exception assuming it means decode() did not find an existing resource.

> PackageRequestTargetUrlCodingStrategy should interrupts the cycle and sends a 404 when a page/class cannot be found.
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-293
>                 URL: https://issues.apache.org/jira/browse/WICKET-293
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta1, 2.0 branch (discontinued)
>            Reporter: Stephane Bailliez
>            Assignee: Juergen Donnerstag
>             Fix For: 1.3.0-beta1
>
>
> Using PackageRequestTargetUrlCodingStrategy and manually hacking the url in the browser will throw up a RuntimeException if it cannot load a corresponding page class. Same could happen if the bookmarkable page does not exist anymore, etc... see stacktrace below.
> The expected behavior is to interrupt the cycle and sends a 404.
> {noformat}
> wicket.WicketRuntimeException: Unable to load class with name: com.mycompany.wicket.pages.xyzw
>      at wicket.application.DefaultClassResolver.resolveClass(DefaultClassResolver.java:70)
>      at wicket.request.target.coding.PackageRequestTargetUrlCodingStrategy.decode(PackageRequestTargetUrlCodingStrategy.java:80)
>      at wicket.protocol.http.request.WebRequestCodingStrategy.targetForRequest(WebRequestCodingStrategy.java:363)
>      at wicket.protocol.http.request.CryptedUrlWebRequestCodingStrategy.targetForRequest(CryptedUrlWebRequestCodingStrategy.java:154)
>      at wicket.request.compound.DefaultRequestTargetResolverStrategy.resolve(DefaultRequestTargetResolverStrategy.java:84)
>      at wicket.request.compound.AbstractCompoundRequestCycleProcessor.resolve(AbstractCompoundRequestCycleProcessor.java:47)
>      at wicket.RequestCycle.step(RequestCycle.java:1008)
>      at wicket.RequestCycle.steps(RequestCycle.java:1100)
>      at wicket.RequestCycle.request(RequestCycle.java:454)
>      at wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:243)
>      at wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:122)
> {noformat}

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