X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fwamblee%2Fphotos%2Fwicket%2FWicketApplication.java;h=a1859a70ac3e0d9bbb7d0276d77a52ee922863fb;hb=6c8dd0362c097e5d3e40ca066b67ce6834e555df;hp=8339000e32d07158e1dd8e72ac180a485e90c7a7;hpb=8845e7fe6141ccc98fd070ee4e653941f6e60508;p=photos diff --git a/src/main/java/org/wamblee/photos/wicket/WicketApplication.java b/src/main/java/org/wamblee/photos/wicket/WicketApplication.java index 8339000..a1859a7 100644 --- a/src/main/java/org/wamblee/photos/wicket/WicketApplication.java +++ b/src/main/java/org/wamblee/photos/wicket/WicketApplication.java @@ -15,22 +15,21 @@ */ package org.wamblee.photos.wicket; -import javax.servlet.http.HttpServletRequest; - import org.apache.wicket.Request; import org.apache.wicket.RequestCycle; import org.apache.wicket.Response; import org.apache.wicket.protocol.http.WebApplication; import org.apache.wicket.protocol.http.WebRequest; -import org.apache.wicket.request.target.basic.RedirectRequestTarget; +import org.apache.wicket.request.target.coding.MixedParamUrlCodingStrategy; import org.apache.wicket.settings.IApplicationSettings; +import org.apache.wicket.settings.IExceptionSettings; import org.wamblee.wicket.inject.ComponentInstantiationInjector; import org.wamblee.wicket.transactions.OpenTransactionInViewRequestCycle; /** * Application object for your web application. If you want to run this * application without deploying, run the Start class. - * + * * @see org.wamblee.Start#main(String[]) */ public class WicketApplication extends WebApplication { @@ -44,8 +43,7 @@ public class WicketApplication extends WebApplication { @Override public RequestCycle newRequestCycle(Request aRequest, Response aResponse) { - return new OpenTransactionInViewRequestCycle(this, - (WebRequest) aRequest, aResponse); + return new OpenTransactionInViewRequestCycle(this, (WebRequest) aRequest, aResponse); } @Override @@ -56,6 +54,8 @@ public class WicketApplication extends WebApplication { IApplicationSettings settings = getApplicationSettings(); settings.setInternalErrorPage(ErrorPage.class); + mount(new MixedParamUrlCodingStrategy("view", HomePage.class, new String[]{"path"})); + // Use the lines below to get the internal error page also when in // development mode. // IExceptionSettings exs = getExceptionSettings(); @@ -68,5 +68,4 @@ public class WicketApplication extends WebApplication { public Class getHomePage() { return HomePage.class; } - }