it is part of the spec that servlet container rewrites any relative
redirect urls to absolute ones. you may want to file a glassfish bug.

-igor

On Tue, Feb 22, 2011 at 10:13 AM, Pepijn de Geus <[email protected]> wrote:
> Hi all,
>
> I'm working on a mobile website to be accessed by all kinds of devices, 
> including the Nokia N95.
> While testing we found out certain links were not working on the N95, while 
> other devices and desktop browsers worked fine. I started a tcpdump and 
> narrowed the problem to a redirect Wicket performs.
>
> My page is mounted on '/m/mypage' using the HybridIndexed strategy. When 
> clicking this link, Wicket enables versioning by redirecting to '/m/mypage.0' 
> (or any other number). The redirect however is not absolute, but relative; 
> the Location header contains '/m/../m/mypage.0'. Almost all browsers resolve 
> the relative part and are redirected properly. The N95 actually performs a 
> request using the relative URL, which Wicket doesn't understand, resulting in 
> a 404.
>
> I found some JavaDoc on WebRequest#sendRedirect(String) proposing a solution 
> to this problem (although mentioning a faulty container instead of mobile 
> device):
> http://wicket.apache.org/apidocs/1.4/org/apache/wicket/protocol/http/WebResponse.html#sendRedirect%28java.lang.String%29
>
> I tried to use this solution, but for some reason RequestCycle.get() returns 
> null while inside the sendRedirect method. I tried to figure out why, but the 
> whole request cycle and unsetting/detaching is still a bit messy for me.
> Anybody know why this is happening, or other solutions to this problem?
>
> Thanks in advance,
> Pepijn
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

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

Reply via email to