Session IdI was not very clear on whole process and how session id and cookies are related to individual user, browser?
When a client is interacting the server id is generated by the server.
(is the above one is session id ???)
Request from the server passes to WebServer.
(how server is different from webserver)
WebServer pass these request to the given Servlet.
Request object sent to the Server creates the instance of the servlet.
This happens in the init() method
(How init method creates instance of servlet as init is part of the servlet method right?If there is no init() method in the servlet then servlet instance cannot be created?)
Servlet creates Session Objects on the Server.
Particular session is having unique id.
The generated id is passed to the client using the response Object.
(is the above one is also session id ???)
It is added to the Cookie in the given browser.Every browser is having differrent Cookie.
So each browser is having differrent Session id.
(if 2 users use same broswer how to to distinguish. Is the every browser has different cookie? or every user has different cookie/sesssion id??)
From novice to tech pro — start learning today.