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 2014/01/13 11:35:51 UTC

[jira] [Resolved] (WICKET-4994) Make URLs (i.e. mount paths) case insensitive for Wicket 6

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

Martin Grigorov resolved WICKET-4994.
-------------------------------------

    Resolution: Fixed

Since Wicket 7.0.0 any AbstractBookmarkableMapper (like MountedMapper and PackageMapper) can handle misspelled (related to case sensitivity only!) mount paths by using:
org.apache.wicket.core.request.mapper.AbstractBookmarkableMapper#setCaseSensitiveMatch(false)

e.g.: in MyApp#init(): mountPage("some/path", SomePage.class).setCaseSensitiveMatch(false);


If the application needs even more complex handling of misspelled errors then it can override org.apache.wicket.core.request.mapper.AbstractBookmarkableMapper#segmentsMatch():

class MyMountedMapper extends AbstractBookmarkableMapper {...}

and then in MyApp#init():

mount(new MyMountedMapper(...))

> Make URLs (i.e. mount paths) case insensitive for Wicket 6
> ----------------------------------------------------------
>
>                 Key: WICKET-4994
>                 URL: https://issues.apache.org/jira/browse/WICKET-4994
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 6.3.0
>            Reporter: Yuci Gou
>            Assignee: Martin Grigorov
>            Priority: Minor
>             Fix For: 7.0.0
>
>
> Hi,
> This is not supported at the moment.
> Please file a ticket to improve it.
> On Tue, Jan 15, 2013 at 6:14 PM, Yuci G EBI <yg...@gmail.com> wrote:
> > Hello,
> >
> > Wonder how to make URLs (i.e. mount paths) case insensitive for Wicket 6?
> > For example, make these two URLs do the same thing: localhost/AboutUs and
> > localhost/aboutus
> >
> > I understand for Wicket 1.4.x, you could achieve it in the way below:
> >
> > public class DemoApplication extends WebApplication
> > {
> >     @Override
> >     protected IRequestCycleProcessor newRequestCycleProcessor() {
> >         return new WebRequestCycleProcessor() {
> >             @Override
> >             protected IRequestCodingStrategy newRequestCodingStrategy() {
> >                 WebRequestCodingStrategy.**Settings strategySettings =
> > new WebRequestCodingStrategy.**Settings();
> >                 strategySettings.**setMountsCaseSensitive(false);
> >                 return new WebRequestCodingStrategy(**strategySettings);
> >             }
> >         };
> >     }
> > }
> >
> > Many thanks,
> > Eusie
> >
> > ------------------------------**------------------------------**---------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.org<us...@wicket.apache.org>
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
> -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com <http://jweekend.com/> 



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)