I dont understand how the second solution solves the problem. Even after working with servlets/JSP for almost two years I am unable to understand
how it solves the problem.
I understand that it created a httpsession in case it is not already created.