Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

container generated *_jsp.java has session call

 
Chetan Sahasrabudhe
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I saw that container generated *_jsp.java file has a call for session
session.getSession();

as per the book getSession() == getSession(true).

If I have done lot of validation in my code to ensure that the session I am using is an existing session and now new sesison shall help complete the request this call in in jsp makes all my efforts void.

any suggestions on how to specify to jsp that I want to use existing session otherwise jsp shall throw exception if session is a newly created session.
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
getSession(true) will only create a new session if one does not already exist. In your scenario you say a session already exists, therefore the call to getSession() [getSession(true)] will simply return the existing session.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic