How will you implement Session tracking in JSP?

We can use different mechanisms to implement Session tracking JSP. Some these mechanisms are as follows:

  • Cookies: We can use cookie to set session information and pass it to web client. In subsequent requests we can use the information in cookie to track session.
  • Hidden Form Field: We can send session id in a hidden field in HTML form. By using this we can track session.
  • Session object: We can use the built in session object to track session in JSP.
  • URL Rewriting: We can also add session id at the end of a URL.

Leave a Reply

Your email address will not be published. Required fields are marked *