I need some help with converting a bookmarkable url into a wicket relative url.

My intent is to persist the url convert it to a wicket relative url and then 
redirect to that relative url.

I am using Component.urlFor(Class, PageParameters) api to generate the 
bookmarkable url.

Some interesting points about this problem is that I am using Wicket 6.0 , and 
Encrypting the URLs (using CryptoMapper).

The url format that comes back from the urlFor API, in my case, is as follows:

generatedUrlString = ./bookmarkable/<path to some wicket page>?x=FWzgyImodAY

I've tried the following to generate a wicket relative URL,


Url url = Url.parse(generatedUrlString);

String url2 = RequestCycle.get().getUrlRenderer().renderRelativeUrl(url);


This comes close, generating a URI, like,


<protocol>://<host>:<port>/wicket/wicket/bookmarkable/<some wicket page>?x



Notice that the parameter is chopped off.


Is there way to achieve a wicket relative url from a bookmarkable url with 
encrypted parameters?


Thanks,

J.D.

Reply via email to