• Post Reply Bookmark Topic Watch Topic
  • New Topic

Session Destroy problem.  RSS feed

 
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?






 
Rancher
Posts: 3255
37
  • 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.
 
Saloon Keeper
Posts: 19014
80
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!