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" (I'm using Wicket 1.2.5):
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 seems wrong to me. The user should never see a RuntimeException no
matter what they type in. So I've subclassed 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. Is this
the right way to solve the problem? If so, I can post the code.
Thanks,
Julian
--
View this message in context:
http://www.nabble.com/Question-about-WebApplication.mount%28String-path%2C-PackageName-packageName%29-tf3717806.html#a10401082
Sent from the Wicket - User mailing list archive at Nabble.com.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user