Background and use cookie and Session produced (under)

Execution of session

The first step in the browser sends a request to the server, the server receives a request to create a Session, the data is transmitted to the client in Session

The second step server receives the request will automatically create request, Session server is automatically created (this is different from the Cookie, to their own new), the first time the browser accesses the server, the server first created

The third step Session (session has its own SID) is stored in the request, the mass together in the past when calling Servlet, can be obtained by request

A fourth step made by the Servlet corresponding to the browser (when a new response automatically Cookie, Cookie bound to the SID is returned to the browser), the end of the request

The fifth step again to access the server, the server will find SID, will have the same multiplex

Session automatically managed by the server, Session rely Cookie

Guess you like

Origin www.cnblogs.com/daemonzd47/p/11210217.html