What do these calls actually mean in terms of session?
System.out.println(\"print1: \"+request.getSession().getId());
System.out.println(\"print2: \"+request.get
request.getSession().getId();
this will return the id of the an existing session.
Request.getsession(false)
it will return the session if it exists, or it will return null otherwise.
and Request.getsession(false) means : give me the session if it exists, otherwise do not create a new instance (and thus return null).