• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getSession(false);

 
Vipul Gulhane
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What happen if I did Like this

HttpSession ses=resquest.getSession(false);
 
Santhosh ayiappan
Ranch Hand
Posts: 80
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
returns the session obj if the session is valid, else you will get null
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34073
335
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean? You get a reference to the session if it exists. But that's in the JavaDoc so I'm guessing you are asking something more specific.
 
bagaria kushal
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This will check whether Session already existed for the request or not. If it existed then it will return the already existed Session. If Session is not already existed for this request then this method will return NULL, that means this method says that the request does not have a Session previously
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic