Example String username=request.getParameter("username");
you can create session with session.setAttribute("username",username);
in the welcome page, you can use if (session.getAttribute("username",null){ RequestDispatcher.getRequestDispatcher("login.jsp").forward(request,response); }
to remove session, session.removeAttribute("username");