The encrypted parameter was my doing, not anything the CryptoMapper would
have done, as you pointed out.

The parameter value was chopped off due to some parsing errors.

I also needed to use,
RequestCycle.get().getUrlRenderer().renderFullUrl(Url).

Thanks for the help.







On 11/13/12 1:30 PM, "Martin Grigorov" <[email protected]> wrote:

>Hi,
>
>Do you use Wicket's CryptoMapper to encrypt the urls ?
>Because last time I checked it it encrypted the url segments themselves.
>Wicket 1.4 works with query parameter named 'x', but since 1.5 there is no
>such parameter.
>
>Additionally Component#urlFor() produces a url which is already relative
>to
>the current page. I'm not sure what more could be done.
>
>
>On Tue, Nov 13, 2012 at 9:21 PM, Corbin, James
><[email protected]>wrote:
>
>> 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.
>>
>>
>
>
>-- 
>Martin Grigorov
>jWeekend
>Training, Consulting, Development
>http://jWeekend.com <http://jweekend.com/>



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to