I'm afraid that's not possible. My company is using GlassFish as a standard.
It should be possible to fix this, since Wicket already suggests a solution. It 
must be possible to get the RequestCycle somehow, right? :)


On 22 feb 2011, at 19:56, Martin Grigorov wrote:

> Try running your application in different web container. I remember some
> version of Tomcat to had that problem.
> Per JEE spec it is container's responsibility to make the redirect url
> absolute.
> 
> On Tue, Feb 22, 2011 at 8:13 PM, Pepijn de Geus <pdeg...@me.com> 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: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
>> 


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

Reply via email to