on-internet

JAVA - Guidance on making the User ID and Session available to all Servlets

fellow computer enthusiasts. I need some help with Java regarding user authentication. When users log in, the system authenticates and makes their ID available to the entire system. Question: How do I capture the user ID of each logged-in user and make it available to all Servlets? Below is the source code I am using. Servlet - User Authentication public class AuthControlador extends HttpServlet { //Identificador único de versão em classes Java private static final long serialVersionUID = 1L; private UserDAO authDao = new UserDAO(); private final String PagLogar = "login.jsp"; private final St

Join the discussion →
Older stories