Just I gone through,
Under what conditions is a JSESSIONID created?
Till now I am in a impression that,
Gives me the current session(giving,not creating) based upon the boolean passed to that method.Looks cool till here.
Now I read that
Session is created when your code calls request.getSession() or request.getSession(true) for the first time.
So ,If I'm not calling request.getSession() in my any of servlets, And those servlets are made to serve some static html pages (around 50),
1)There is no need of a session between the container and the client ?
2)If no how container is detecting(serving a html page) client ?any hidden info in headers other than the session id?
1)There is no need of a session between the container and the client ?
---> Not necessary if it is just html pages, for e.g. JavaDocs html pages, you do not need session to create.
2)If no how container is detecting(serving a html page) client ?any hidden info in headers other than the session id?
----> It is the URL and you map url with html page or you just keep your pages with public access. Here, if request is hit, tomcat will create thread, which will serve the request by writing the request page in response.
Take a look at HTTP Request header