Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Session Destroy problem.

 
sarojni agrwal
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I have a problem, in destroy of session.
I made a jsp page.



This is servlet.




another servlet(in this servlet, I used session.invalidate()) to destroy session , but it did not work, when I try to run any program , the browser gives same value. what should I do?






 
Dave Tolls
Ranch Hand
Posts: 1906
14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's the flow?
That JSP is only calling "/check1".
I don't see anything calling "/check".

That's the first thing I noticed.

After that, I would suggest sticking in some debug statements to log where you are getting to in the code.
 
Tim Holloway
Saloon Keeper
Posts: 18303
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are calling getSession without any parameters. The defauit (no-parameter) implementation of getSession is equivalent to getSession(true). So you're creating a new session.

Which is just as well, since you aren't checking to see if getSession returned null.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic