I am using tomcat as my webserver. I hit some url in IE and put some object in HttpSession
for that request.
Now my questions:
If I close the browser and and hit the url in new browser, will the object I earlier put in session will be available?
If I don't close the browser and and hit the url in a new tab/window, will the object i earlier put in session will be available?
The HttpSession
javadoc says the following:
Provides a way to identify a user across more than one page request or visit to a Web site and to store information about that user.
As per my understanding here term "user" means the "browser". As soon as we open a new browser, then Tomcat/any webserver treats it as a new user. Is this correct? Does Tomcat achieve it using cookies or rewriting URLs?
The javadoc also says:
Session information is scoped only to the current web application (ServletContext).
If that's is the case, any object we set in session should be visible to all user request even firing from different machines as there is servlet context per webserver. But this is true in case of application scope not in session scope. I did not get what it is trying to say here.