to create an absolute url use:

requestCycle.getUrlRenderer().renderFullUrl(relativeUrl.toString())


On Wed, May 9, 2012 at 12:07 PM, Thomas Heigl <tho...@umschalt.com> wrote:
> Hey Martin,
>
> Thanks for the explanation!
>
> How exactly the home page is broken ? Do you have custom RequestMapper
>> for the home page ?
>
>
> The problem is in absolute URL generation. I generate absolute URLs for
> sitemaps, canonical URL tags etc and my logic broke after upgrading to
> Wicket 1.5.6 because my "URL absolutizer" was confused by "./."  for the
> homepage.
>
> I don't use a request mapper for the homepage. Would it solve the problem
> to mount the homepage under "/"?
>
> Cheers,
>
> Thomas
>
> On Wed, May 9, 2012 at 11:00 AM, Martin Grigorov <mgrigo...@apache.org>wrote:
>
>> Hi,
>>
>> They have always been relative.
>> Before 1.5.6: some/relative/url
>> After 1.5.6: ./somerelative/url
>>
>> Both are the same. The reason is
>> https://issues.apache.org/jira/browse/WICKET-4260
>>
>> How exactly the home page is broken ? Do you have custom RequestMapper
>> for the home page ?
>>
>> On Wed, May 9, 2012 at 11:56 AM, Thomas Heigl <tho...@umschalt.com> wrote:
>> > Hello,
>> >
>> > Since Wicket 1.5.6, the UrlRender generates all URLs prefixed with "./"
>> > when using RequestCycle.get().urlFor(pageClass). The Problem is that for
>> my
>> > application's homepage the generated URL is "./." which does not really
>> > make sense.
>> >
>> > Is there any reason for doing this? What caused the change to relative
>> URL
>> > rendering?
>> >
>> > Cheers,
>> >
>> > Thomas
>>
>>
>>
>> --
>> Martin Grigorov
>> jWeekend
>> Training, Consulting, Development
>> http://jWeekend.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to