Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
- // TODO Auto-generated method stub
- doGet(request, response);
- RequestDispatcher requestDispatcher;
- if (request.getParameterMap().containsKey("login") && request.getParameterMap().containsKey("password")) {
- String login = request.getParameter("login");
- String password = request.getParameter("password");
- if (login.equals(password)) {
- HttpSession session = request.getSession(true);
- session.setAttribute("login", login);
- session.setMaxInactiveInterval(30);
- //response.sendRedirect("home.jsp");
- requestDispatcher = request.getRequestDispatcher("/Process");
- requestDispatcher.forward(request, response);
- }
- else {
- requestDispatcher = request.getRequestDispatcher("/LogIn");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement