You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Alastair Maw (JIRA)" <ji...@apache.org> on 2007/05/14 02:54:15 UTC

[jira] Assigned: (WICKET-554) Provide a default page when mounting a URL using WebApplication.mount(String path, PackageName packageName)

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

Alastair Maw reassigned WICKET-554:
-----------------------------------

    Assignee: Alastair Maw

> Provide a default page when mounting a URL using WebApplication.mount(String path, PackageName packageName) 
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-554
>                 URL: https://issues.apache.org/jira/browse/WICKET-554
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.2.6, 1.3
>            Reporter: Julian Sinai
>         Assigned To: Alastair Maw
>             Fix For: 1.3
>
>         Attachments: PackageRequestTargetUrlCodingStrategy.diff, WebApplication.diff
>
>
> If you mount a package e.g.
>     	mount("/pages", PackageName.forClass(Index.class));
> You will run into a RuntimeException if you type in a url like "http://localhost:8081/quickstart/app/pages":
> WicketMessage: Unable to load class with name: wicket.quickstart.
> Root cause:
> wicket.WicketRuntimeException: Unable to load class with name: wicket.quickstart.
> at wicket.application.DefaultClassResolver.resolveClass(DefaultClassResolver.java:66)
> at wicket.request.target.coding.PackageRequestTargetUrlCodingStrategy.decode(PackageRequestTargetUrlCodingStrategy.java:82)
> ...
> This is wrong. The user should never see a RuntimeException no matter what they type in. So I've patched WebApplication and PackageRequestTargetUrlCodingStrategy to accept a mount of the form:
>     	mount("/pages", Index.class);
> This mounts the pages in the package just like PackageRequestTargetUrlCodingStrategy, but also uses Index.class as the default page if the user types in a URL that doesn't specify a page.

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