Under what conditions is a JSESSIONID created?

后端 未结 5 943
灰色年华
灰色年华 2020-11-22 09:34

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

5条回答
  •  醉梦人生
    2020-11-22 10:16

    Beware if your page is including other .jsp or .jspf (fragment)! If you don't set

    <%@ page session="false" %>
    

    on them as well, the parent page will end up starting a new session and setting the JSESSIONID cookie.

    For .jspf pages in particular, this happens if you configured your web.xml with such a snippet:

    
        
            *.jspf
        
    
    

    in order to enable scriptlets inside them.

提交回复
热议问题