What is session tracking and how do you track a user session in servlets ?

Session tracking is a mechanism that servlets use to maintain state about a series requests from the same user across some period of time. The methods used for session tracking are:

a) User Authentication : It occurs when a web server restricts access to some of its resources to  only those clients that log in using a recognized username and password

b) Hidden form fields: This fields are added to an HTML form that are not displayed in the client’s  browser. When the form containing the fields is submitted, the fields are sent back to the server


c) URL rewriting: Every URL that the user clicks on is dynamically modified or rewritten to  include extra information. The extra information can be in the form of extra path information,  added parameters or some custom, server-specific URL change.

d) Cookies
A "cookie" is a small piece of information sent by a web server to store on a web browser so it can later be read back from that browser. This is useful for having the browser remember some specific information. .

e) HttpSession: HttpSession places a limit on the number of sessions that can exist in memory. This limit is  set in the session.maxresidents property


Enter your email address to get our daily JOBS & INTERVIEW FAQ's Straight to your Inbox.

Make sure to activate your subscription by clicking on the activation link sent to your email