Hi Mark,

if you are using wicket1.1 then your only choice is pretty much to use a url rewriting filter to dress up the url. this is pretty easy to do. there is a good filter here: http://tuckey.org/urlrewrite/

you can also add an alias to your page so it uses that in the url instead of fqn. but this is no longer supported in 1.2

if you are using wicket1.2 you have a lot more flexibility when it comes to urls. we provide a mounting mechanism that allows you to "mount" a bookmarkable page along with its parameters on a url of your choice.

For example if you have a bookmarkable page B that takes pageparameters contaning P1=V1 and P2=V2 and you mount it on path /page it will be accissible through <server>/<context>/app/page/P1/V1/P2/V2

you can control how the parameter encoding happens by providing your own implementation of IPageParametersEncoder if the above (default so far) doesnt work for you. for examples on how to set the above up please see the cvs HEAD of wicket-examples - niceurls.

-Igor


On 12/3/05, Mark Derricutt <[EMAIL PROTECTED]> wrote:
Hey all, so I'm starting to play with Wicket and loving it, but I currently have a small pethate with the URL scheme used in the application.

I realize the look of the URL "shouldn't" really matter, but I keep finding myself disliking it.

Currently my app shows a URL like:

  http://localhost:8081/quickstart/app?bookmarkablePage=com.theoryinpractice.testapp.pages.CommentsPage

Is there a way to get the app to resolve the above using something like:

  http://localhost:8081/quickstart/app/page/Podcomments

or even

  http://localhost:8081/quickstart/app?page=Podcomments


I guess it could be possible to say 'register' the package
com.theoryinpractice.testapp.pages as a place where pages could be found and "resolve" the class to use instead of using the FQN all the time, this would only work in the case of unambiguous classes thou.

Or maybe theres something already in wicket for more REST like URL schemes?  I notice in the basic framework there's only a BookmarkablePage extension of Page, is there something in wicket-stuff maybe?

Reply via email to