Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
- String username = request.getParameter("username");
- String pass = request.getParameter("pass");
- for (int i = 0; i < users.size(); i++) {
- if(users.get(i).getUsername().equals(username) && users.get(i).getPass().equals(pass)){
- HttpSession session = request.getSession();
- session.setAttribute("korisnik", users.get(i));
- response.sendRedirect("WebShopServlet");
- return;
- }
- }
- response.sendRedirect("Login.html");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement