You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Dirk Forchel <di...@exedio.com> on 2012/05/14 15:37:45 UTC

Wicket 1.5.6 duplicates segments in absolute URLs

Since we migrate our application to Wicket 1.5.6 some URLs from
BookmarkablePageLinks have duplicate segements for indicating a Shop and a
Language item from our persistence model. For indicating a Shop and Language
item we use our own ShopMapper and LanguageMapper (subclass of
AbstractComponentMapper). This was working until we migrate to 1.5.6. 
For instance ...

correct URL: host/servlet/shop/en/page
wrong URL: host/servlet/shop/en/shop/en/page

This happens, for example, when the protocol of the linked URL is different
from the current protocol (http/https). So, basically, all links that point
to pages that are annotated with @RequireHttps are wrong.

In our Application class we set the HttpsMapper as RootRequestMapper, e.g.:



Using a debugger, I've tracked down the spot where wrong URL is rendered:


Either it's a bug in Wicket introduced with WICKET-4518 or WICKET-4514 or
there's something wrong with our LanguageMapper and ShopMapper. The
algorithm of these two mappers that add the segment to the URL are called
twice in resolveRelative.
Any idea?

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-6-duplicates-segments-in-absolute-URLs-tp4632213.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Wicket 1.5.6 duplicates segments in absolute URLs

Posted by Martin Grigorov <mg...@apache.org>.
The attachment didn't make it.
Send it to mgrigorov at apache org

On Tue, May 15, 2012 at 11:55 AM, Dirk Forchel <di...@exedio.com> wrote:
> Hi Martin,
> attached you can find the quickstart application.
> Thanks,
>   Dirk
>
> Am 15.05.2012 10:39, schrieb Martin Grigorov-4 [via Apache Wicket]:
>> Thanks.
>> Send it directly to me. I'll attach it when Jira is OK.
>>
>> On Tue, May 15, 2012 at 10:34 AM, Dirk Forchel <[hidden email]
>> </user/SendEmail.jtp?type=node&node=4634095&i=0>> wrote:
>>
>> > I've created issue https://issues.apache.org/jira/browse/WICKET-4561.
>> > Unfortunately I can't attach the quickstart since the JIRA server does
>> > respond with an error message.
>> >
>> > --
>> > View this message in context:
>> http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-6-duplicates-segments-in-absolute-URLs-tp4632213p4634089.html
>> > Sent from the Users forum mailing list archive at Nabble.com.
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: [hidden email]
>> </user/SendEmail.jtp?type=node&node=4634095&i=1>
>> > For additional commands, e-mail: [hidden email]
>> </user/SendEmail.jtp?type=node&node=4634095&i=2>
>> >
>>
>>
>>
>> --
>> Martin Grigorov
>> jWeekend
>> Training, Consulting, Development
>> http://jWeekend.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> </user/SendEmail.jtp?type=node&node=4634095&i=3>
>> For additional commands, e-mail: [hidden email]
>> </user/SendEmail.jtp?type=node&node=4634095&i=4>
>>
>>
>>
>> ------------------------------------------------------------------------
>> If you reply to this email, your message will be added to the
>> discussion below:
>> http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-6-duplicates-segments-in-absolute-URLs-tp4632213p4634095.html
>>
>> To unsubscribe from Wicket 1.5.6 duplicates segments in absolute URLs,
>> click here
>> <http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4632213&code=ZGlyay5mb3JjaGVsQGV4ZWRpby5jb218NDYzMjIxM3wxOTkzMTkyMTE4>.
>> NAML
>> <http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
>
> --
> Dirk Forchel
> Software Engineer
>
> Telefon +49 (351) 4108-115
> Fax +49 (351) 4108-5115
> dirk.forchel@exedio.com
> www.exedio.com
>
> exedio Gesellschaft für Softwareentwicklung mbH
> Buchenstraße 16 B
> 01097 Dresden
> Deutschland
>
> Handelsregister: HRB 22109, Amtsgericht Dresden
> Sitz der Gesellschaft: Dresden
> Geschäftsführer: Sven-Erik Bornscheuer, Lutz Kirchner, Falk Krause
>
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-6-duplicates-segments-in-absolute-URLs-tp4632213p4634199.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



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

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


Re: Wicket 1.5.6 duplicates segments in absolute URLs

Posted by Dirk Forchel <di...@exedio.com>.
Hi Martin,
attached you can find the quickstart application.
Thanks,
   Dirk

Am 15.05.2012 10:39, schrieb Martin Grigorov-4 [via Apache Wicket]:
> Thanks.
> Send it directly to me. I'll attach it when Jira is OK.
>
> On Tue, May 15, 2012 at 10:34 AM, Dirk Forchel <[hidden email] 
> </user/SendEmail.jtp?type=node&node=4634095&i=0>> wrote:
>
> > I've created issue https://issues.apache.org/jira/browse/WICKET-4561.
> > Unfortunately I can't attach the quickstart since the JIRA server does
> > respond with an error message.
> >
> > --
> > View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-6-duplicates-segments-in-absolute-URLs-tp4632213p4634089.html
> > Sent from the Users forum mailing list archive at Nabble.com.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email] 
> </user/SendEmail.jtp?type=node&node=4634095&i=1>
> > For additional commands, e-mail: [hidden email] 
> </user/SendEmail.jtp?type=node&node=4634095&i=2>
> >
>
>
>
> -- 
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email] 
> </user/SendEmail.jtp?type=node&node=4634095&i=3>
> For additional commands, e-mail: [hidden email] 
> </user/SendEmail.jtp?type=node&node=4634095&i=4>
>
>
>
> ------------------------------------------------------------------------
> If you reply to this email, your message will be added to the 
> discussion below:
> http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-6-duplicates-segments-in-absolute-URLs-tp4632213p4634095.html 
>
> To unsubscribe from Wicket 1.5.6 duplicates segments in absolute URLs, 
> click here 
> <http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4632213&code=ZGlyay5mb3JjaGVsQGV4ZWRpby5jb218NDYzMjIxM3wxOTkzMTkyMTE4>.
> NAML 
> <http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> 
>


-- 
Dirk Forchel
Software Engineer

Telefon +49 (351) 4108-115
Fax +49 (351) 4108-5115
dirk.forchel@exedio.com
www.exedio.com

exedio Gesellschaft für Softwareentwicklung mbH
Buchenstraße 16 B
01097 Dresden
Deutschland

Handelsregister: HRB 22109, Amtsgericht Dresden
Sitz der Gesellschaft: Dresden
Geschäftsführer: Sven-Erik Bornscheuer, Lutz Kirchner, Falk Krause



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-6-duplicates-segments-in-absolute-URLs-tp4632213p4634199.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Wicket 1.5.6 duplicates segments in absolute URLs

Posted by Martin Grigorov <mg...@apache.org>.
Thanks.
Send it directly to me. I'll attach it when Jira is OK.

On Tue, May 15, 2012 at 10:34 AM, Dirk Forchel <di...@exedio.com> wrote:
> I've created issue https://issues.apache.org/jira/browse/WICKET-4561.
> Unfortunately I can't attach the quickstart since the JIRA server does
> respond with an error message.
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-6-duplicates-segments-in-absolute-URLs-tp4632213p4634089.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



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

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


Re: Wicket 1.5.6 duplicates segments in absolute URLs

Posted by Dirk Forchel <di...@exedio.com>.
I've created issue https://issues.apache.org/jira/browse/WICKET-4561.
Unfortunately I can't attach the quickstart since the JIRA server does
respond with an error message.

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-6-duplicates-segments-in-absolute-URLs-tp4632213p4634089.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Wicket 1.5.6 duplicates segments in absolute URLs

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

On Mon, May 14, 2012 at 3:37 PM, Dirk Forchel <di...@exedio.com> wrote:
> Since we migrate our application to Wicket 1.5.6 some URLs from
> BookmarkablePageLinks have duplicate segements for indicating a Shop and a
> Language item from our persistence model. For indicating a Shop and Language
> item we use our own ShopMapper and LanguageMapper (subclass of
> AbstractComponentMapper). This was working until we migrate to 1.5.6.
> For instance ...
>
> correct URL: host/servlet/shop/en/page
> wrong URL: host/servlet/shop/en/shop/en/page
>
> This happens, for example, when the protocol of the linked URL is different
> from the current protocol (http/https). So, basically, all links that point
> to pages that are annotated with @RequireHttps are wrong.
>
> In our Application class we set the HttpsMapper as RootRequestMapper, e.g.:
>
>
>
> Using a debugger, I've tracked down the spot where wrong URL is rendered:
>
>
> Either it's a bug in Wicket introduced with WICKET-4518 or WICKET-4514 or
> there's something wrong with our LanguageMapper and ShopMapper. The
> algorithm of these two mappers that add the segment to the URL are called
> twice in resolveRelative.
> Any idea?

Create a quickstart (better without your mappers) and attach it to a
ticket in Jira.

>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-1-5-6-duplicates-segments-in-absolute-URLs-tp4632213.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



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

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