Session values not stored in wicket application using Chrome
Our wicket application has the following scenario:
- save myValue in the session
- redirect the user to an external page
- the external pages redirects back to our webapp after the user entered some data
- read myValue from the session and do something based on myValue
It all works just fine in Firefox, but not in Chrome. Using Chrome myValue is null when the user returns to the our wicket page again. My first guess was that a new session must have been created or that myValue was never set. I debugged through the code and the session id is exactly the same ... myValue has also been set before the user got redirected.
I don't quite get ho开发者_开发百科w Chrome and Firefox would behave differently when it comes to saving values into the wicket session. Or how leaving the webpage and returning to it 1 minute later would suddenly result in a different kind of session.
The use-case that you have mentioned your site --> external site --> your site is something I have encountered when I was working on OAUTH authentication where the flow is same i.e my site --> facebook -->my site.
My solution was not to rely upon browser session/cookie; I persisted all the data I needed to reload the session and sent the user to FB along with a key (used to identify the cached session information )and also had FB pass back this key to my application which I then used to reload the session data.
I am completely floored because the favicon solution mentioned above worked for me. Been pulling hair for 3 years on this and can't believe the fix is so simple. I reported this fix to Chrome.
I'm front ending Tomcat 6.0.32 with Apache 2.2.14 in ContOS 5.7. Tomcat is hosting a Java Struts application. Simply added
<link rel="shortcut icon" href="/festival/images/ft_ico_2.ico"/>
in all the head
tags for each and every jsp page. Problem solved !!
精彩评论