What are different ways of session management in servlets?
Answered
What are different ways of session management in servlets?
Best answer
Session represents a conversional state between client and server and it can consists of multiple request and response between client and server. Since HTTP is stateless, the only way to maintain a session is when some unique information about the session (session id) is passed between server and client in every request and response. Session can be handled in Servlet using one of the following techniques:
- HTML Hidden Form Fields
- Cookies
- URL Rewriting
- Session Management API