What is SessionID?


Many users are interacting with the server and for each user a session is created in the server and it get identified uniquely by the SessionID. At the time of creation of session for each user a unique ID is generated by the Container which keep every user's session different from each other, is called as jsessionid.

How SessionID is managed internally?


To identify the request uniquely  from a particular client machine within its session, the SessionID is used .This ID is fed into the client machine in the  Cookies with the first response after session creation with other some other information like domain and server name.It comes with every request in the request header from the client machine and get matched with the jsessionid value present in the server. If it gets matched then it confirms that the request is valid for this active session, and if not matched then a new session is again created by the Container and again a new jsessionid created and returned back to the client machine with the response.

Note : 
*jsession is managed both by the client and the server. In the client machine it is stored in the cookie with the name jsessionid and at the server side also it is stored with the name jsessionid. 

*Request header carries the jsessionid information with every request.

*Response header carries the cookies which is having the jsessionid information with the first response after creating the session object. 

Related Posts:

  • forward() in servlet forward() is a method in RequestDispatcher interface which is used to dispatch the control from a servlet to another servlet/jsp. Container is responsible to dispatch the the control by finding the full path internally eith… Read More
  • include() in servlet include() is a method defined in the RequestDispatcher interface with ServletRequest and ServletResponse as a parameter. It is same as forward with slight difference of storing the content of both source and target resourc… Read More
  • Hidden Form field in Session handling One of the major disadvantage with the URL Rewriting is that passing session data with the URL makes visible to every one who are requesting for the resource. To over come this problem the concept of hidden form field is i… Read More
  • URL Re-writing in Session Handling URL Re-writing is a technique by which session data can be handled within the server side only.Client is not responsible for keeping any information regarding session. In this process at every request the required session da… Read More
  • Handling Session in Servlet Handling session defines how session should be managed internally. Session is meant for keeping track of user's information which is required further for the next proceeding requests. Scope of a session is alive from its cr… Read More

1 comment:

  1. plz elaborate more abut jseesionid ,its nt clear enough

    ReplyDelete

Ads 468x60px

.

Ads

.

Featured Posts

Popular Posts

Like Us On FaceBook

Total Pageviews

201977

Online Members

Live Traffic