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:

  • What is a Web Container After developing Servlet Application we need to deploy and run our application at theWeb-Server. When a Web-server starts it internally starts a web-container which is also termed as servlet container.  What is a we… Read More
  • ServletContext Object in Servlet ServletContext is only a single object to a whole Servlet Application. It is once created and initialized by the web container at the container start-up. A Web application has many Servlet classes and for every servlet… Read More
  • HttpSession Object in Servlet In servlet we are getting the session Object in terms of HttpSession by calling getSession() method with the HttpServletRequest object. What is a session ? Session is a object which uniquely identifies the active user so t… Read More
  • What Happens at Container Start-Up in Servlet There are many task happening internally inside the Web-Server. Following are the list of task performed at the container start-up : 1. Reads the web.xml file or Annotations specified on various web components and stores al… Read More
  • ServletConfig Object in Servlet ServletContext object is common to all the servlet but ServletConfig object is different for all the servlets and must be created at the time of container start-up for every Servlet. ServletConfig object of one servlet is a… 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

201973

Online Members

Live Traffic