Thanks a lot Martin!

I now did an quick override of it and now all URLs are absolute like I wanted 
them to be... Is there a special reason why wicket is so into this relative 
nightmare? I mean, why not just make all either absolute or full-URLs? 

I mean depending on the Url paths you get so great things like (same jquery, 
different wicket pages):

<script src="/wicket/resource/[...].js"
<script src="../wicket/resource/[...].js"
or even
<script src="../../wicket/resource/[...].js"

Why not just use absolute URLs global by default instead?

----- Ursprüngliche Mail -----
> Von: "Martin Grigorov" <>
> An:
> Gesendet: Samstag, 28. April 2018 13:11:49
> Betreff: Re: make all links to absolute ones?

> In use setRequestCycleProvider(() -> new
> MyRequestCycle())
> On Sat, Apr 28, 2018 at 11:45 AM, Korbinian Bachl <
>> wrote:
>> Hi,
>> in wicket 8 (M9) in RequestCylce there is
>> protected UrlRenderer newUrlRenderer()
>>         {
>>                 // All URLs will be rendered relative to current request
>> (can be overridden afterwards)
>>                 return new UrlRenderer(getRequest());
>>         }
>> but how can I override it with a custom UrlRenderer? - I try to make all
>> URLs to absolute ones and I tried to just override the shouldRenderAsFull
>> with true in UrlRenderer but I cant seem to find how to make wicket use the
>> new UrlRenderer. The only part where this is used is in ServletWebResponse
>> as well as RequestCycle, however, RequestCycle itself is used only on
>> Application.internalInit and the warnings there to not touch it are strong
>> :/
>> Any Idea how I can override this part globally?
>> Best,
>> KB
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to