1

1)what is the difference of session and cookie.

I know the cookie is stored at client-side,and the session in server-side.

But I wonder what is the realation ship of them?

Someone tell me that there are two ways to implement the session:the cookie and the url-rewrite. so I am confused....

I have read the answer in this question: what-is-the-difference-between-a-session-and-a-cookie

2)how about the life cycle of session.

When is it created? Does each http request will create a new session(suppose the request.setSession(true))? When does the session closed? I know the session will be timeout when the browser is closed. But what is the exactly meaning of the session timeout?

Community
  • 1
  • 1
hguser
  • 35,079
  • 54
  • 159
  • 293

0 Answers0