• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Invalidating HttpSession on JBoss 4.2.2 vs. 5.0.0Beta

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello everyone

I am an absolute beginner at servlet programming.
I'm having a hard time figuring out why the HttpSession.invalidate() method behaves differently on JBoss 4.2.2GA and 5.0.0Beta4.

My servlet is very simple:



When deployed to JBoss 5 I get what I expect: Every time I click the browser's reload button a different ID is printed out. (This also happens when I deployed the servlet to Tomcat 6). So far so good.

But when deployed to JBoss 4.2.2 the session ID does not change when the reload button is clicked. So I guess the session doesn't really get invalidated.

Could anybody please give me some hints why this is could be happening? Is there some configuration I'm missing with JBoss 4.2.2?

Thanks in advance
Oliver
[ April 17, 2008: Message edited by: Oliver Swift ]
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you sure you're not getting a cached version of the page?

Instead of refreshing, try adding a unique querystring variable to the page url and see if it changes.


With something like:

[ April 17, 2008: Message edited by: Ben Souther ]
 
Oliver Swift
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ben

Thanks for your reply. I tried adding a unique querystring as you suggested. Unfortunately to no avail.

Could it have anything to do with the Tomcat version in JBoss 4.2.2 that is different from the one in JBoss 5?

Regards
Oliver
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please check this url https://jira.jboss.org/jira/browse/JBAS-1400

emptySessionPath="false" in server.xml this will allow you to create new session id's

Thanks,
S.Sudhakar
[ September 23, 2008: Message edited by: sudhakar sambanthan ]
reply
    Bookmark Topic Watch Topic
  • New Topic