Session is a time interval devoted to an activity.
Session Tracking or session management is a way of maintaining the state of the user.
Need of Session Tracking:
As we discussed in earlier tutorials we are using HTTP for completing request response cycle. HTTP is a stateless protocol which means when a new request comes it can’t keep any record or state of previous request of the user. That’s why we need session tracking for maintaining the state of the user.
Way of Session Tracking in servlet:
Next Topic: Cookie in servlet with example.
Previous Topic: Servlet Hello World Example using annotation with example.