You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Alec Swan <al...@gmail.com> on 2012/07/14 19:30:00 UTC

Understanding Wicket redirect behavior

Hello,

While working on my previous problem I found out that when I do a GET
to one of my bookmarkable pages, e.g. /lrm/ms/oid/123, I get a 302
redirect to /lrm/ms/oid/../../ms/oid/123.0;jsessionid=xxx. However,
when I do a GET to /lrm/network I get a 200 response and jsessionid is
set as a cookie in the response.

/lrm/network is explicitly mounted as mountBookmarkablePage in
Application.init(). We are using Tomcat 6.0 and Wicket 1.4.17.

How can I make /lrm/ms/oid/123 return 200 just like /lrm/network?
Should we somehow mountBookmarkablePage each such page which we have
thousands of? Will upgrading to Wicket 1.5 help achieve this behavior?

Thanks,

Alec

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


Re: Understanding Wicket redirect behavior

Posted by Alec Swan <al...@gmail.com>.
Thanks Josh, I upgraded to Tomcat7 and was able to disable cookies as
you suggested. It worked! This, however does not help me change 302
redirect to 200.

Is there any way I can make /lrm/ms/oid/123 return 200 just like
/lrm/network as explained in my original post?

Thanks,

Alec


On Sat, Jul 14, 2012 at 12:36 PM, Josh Kamau <jo...@gmail.com> wrote:
> I read somewhere that :
>
> When its first time you are accessing a page, tomcat doesnt know if cookies
> are supported.. so to be safe, it will embed the session id in the url. IF
> you then access another page, this time round tomcat knows what kind of
> browser its dealing with ... and if cookies are supported, it wont embed
> the session id in the url but will put it in a cookie..
>
> Now to tell tomcat to always use the cookies , you add
>
> <session-config>
>      <tracking-mode>COOKIE</tracking-mode>
>  </session-config>
>
>
> In your web.xml file..
>
> Cheers
> Josh
>
> On Sat, Jul 14, 2012 at 8:30 PM, Alec Swan <al...@gmail.com> wrote:
>
>> Hello,
>>
>> While working on my previous problem I found out that when I do a GET
>> to one of my bookmarkable pages, e.g. /lrm/ms/oid/123, I get a 302
>> redirect to /lrm/ms/oid/../../ms/oid/123.0;jsessionid=xxx. However,
>> when I do a GET to /lrm/network I get a 200 response and jsessionid is
>> set as a cookie in the response.
>>
>> /lrm/network is explicitly mounted as mountBookmarkablePage in
>> Application.init(). We are using Tomcat 6.0 and Wicket 1.4.17.
>>
>> How can I make /lrm/ms/oid/123 return 200 just like /lrm/network?
>> Should we somehow mountBookmarkablePage each such page which we have
>> thousands of? Will upgrading to Wicket 1.5 help achieve this behavior?
>>
>> Thanks,
>>
>> Alec
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>

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


Re: Understanding Wicket redirect behavior

Posted by Josh Kamau <jo...@gmail.com>.
I read somewhere that :

When its first time you are accessing a page, tomcat doesnt know if cookies
are supported.. so to be safe, it will embed the session id in the url. IF
you then access another page, this time round tomcat knows what kind of
browser its dealing with ... and if cookies are supported, it wont embed
the session id in the url but will put it in a cookie..

Now to tell tomcat to always use the cookies , you add

<session-config>
     <tracking-mode>COOKIE</tracking-mode>
 </session-config>


In your web.xml file..

Cheers
Josh

On Sat, Jul 14, 2012 at 8:30 PM, Alec Swan <al...@gmail.com> wrote:

> Hello,
>
> While working on my previous problem I found out that when I do a GET
> to one of my bookmarkable pages, e.g. /lrm/ms/oid/123, I get a 302
> redirect to /lrm/ms/oid/../../ms/oid/123.0;jsessionid=xxx. However,
> when I do a GET to /lrm/network I get a 200 response and jsessionid is
> set as a cookie in the response.
>
> /lrm/network is explicitly mounted as mountBookmarkablePage in
> Application.init(). We are using Tomcat 6.0 and Wicket 1.4.17.
>
> How can I make /lrm/ms/oid/123 return 200 just like /lrm/network?
> Should we somehow mountBookmarkablePage each such page which we have
> thousands of? Will upgrading to Wicket 1.5 help achieve this behavior?
>
> Thanks,
>
> Alec
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>