Question: what is the difference between getsession true and false?
Answer: 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. ... getSession(false) will return current session if current session exists.