Amit Ghorpade wrote:The getSession() is same as getSession(false). That means you don't get any session if it does not exist before getSession() is called.
Whereas getSession(true) always returns a session, either the existing one or a new one if none exists.
Hope this helps
In the link i can see:
"HttpSession getSession() = Returns the current session associated with this request, or if the request does not have a session, creates one."
As far i understand getSession() its the same as getSession(true), and not getSession(false), right?
So, i was wondering why have both methods, if getSession(boolean x) alread satisty both situations.