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

Post a Comment