Reputation: 4732
if I call request.getSession() does it return me the whole session in the web server? or does it return only the session that is associated with the current user?
Upvotes: 0
Views: 94
Reputation: 5946
request.getSession() only returns the session that is associated with current user.
You can check this in your web application for accessing same object that are stored in session for different browser, such as firefox or IE which keeps each own session.
http://docs.oracle.com/javaee/1.4/api/javax/servlet/http/HttpServletRequest.html#getSession%28%29 said
Returns the current session associated with this request, or if the request does not have a session, creates one.
Upvotes: 1
Reputation: 2762
According to JAVA API Documentation, it returns the current session associated with this request, or if the request does not have a session, creates one.
So its for current user.
Upvotes: 0