When / what are the conditions when a JSESSIONID
is created?
Is it per a domain? For instance, if I have a Tomcat app server, and I deploy multiple web
Here is some information about one more source of the JSESSIONID
cookie:
I was just debugging some Java code that runs on a tomcat server. I was not calling request.getSession()
explicitly anywhere in my code but I noticed that a JSESSIONID
cookie was still being set.
I finally took a look at the generated Java code corresponding to a JSP in the work directory under Tomcat.
It appears that, whether you like it or not, if you invoke a JSP from a servlet, JSESSIONID
will get created!
Added: I just found that by adding the following JSP directive:
<%@ page session="false" %>
you can disable the setting of JSESSIONID
by a JSP.