Question: what is the difference between request.getsession() and request.getsession(true)?
Answer: getSession() will return a current session. ... getSession(true) will return current session. If current session does not exist, then it will create a new session. So basically there is not difference between both method.