Explain Session tracking using Servlet



Question: How to track a user session in Servlets?
Answer:
The interface HttpSession can be used to track the session in the Servlet. Following code can be used to create session object in the Servlet: HttpSession session = req.getSession(true);

Related Post

  • Define Precompile of Jsp page
  • Calling a Method in Java
  • What is API
  • What is JRE ? Explain
  • Why does EJB needs two interfaces

Post a Comment