0

I was tasked with modifying a wicket6/glassfish4 application so that the session id changes as soon as a user logs in. This is to avoid the problem of Session Fixation. I used the replaceSession() method (from the wicket Session class), which does a destroy() and a bind(). replaceSession(). It seems to do the trick as the session id does indeed change. The problem is that now we see a jsessionid in the url everytime we initially log on. The id goes away after you log in and only appears on the initial launch.

My question is, is there a way to ensure that no jessionid appears in the url AND that the session id changes? Any advice would be greatly appreciated.

Cristik
  • 30,989
  • 25
  • 91
  • 127
  • Possibly similar question (about JSESSIONID - not wicket) is asked here: http://stackoverflow.com/questions/1045668/jsessionid-is-occured-in-all-urls-which-are-generated-by-jstl-curl-tag – Mihir Dec 04 '15 at 18:55

1 Answers1

0

Use

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

in your web.xml.

martin-g
  • 17,243
  • 2
  • 23
  • 35