• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

httpsession problem

 
ajse ruku
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

As per specification, request.getSession(false) should return NULL if its a new request. But the problem is that its always returning session object in my application. I have a jsp and that jsp is hitting a servlet. I am writing request.getSession(false) in the servlet. There is no session specific code in my jsp. Please let me know if i am missing something.

regards,
Ajse
 
Balu Sadhasivam
Ranch Hand
Posts: 874
Android Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Ajse,

What do you thik a JSP is ? its compiled to Servlet isnt it ? Did you notice what page session attributes are ? session defaults to "true" in JSP. So if you hit JSP , it creates a session if there is none , or uses the existing one.
 
ajse ruku
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Balu for your reply.

regards,
Ajit
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic