src/java/Servlet/ServletAdminLogin.java
@Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
            String username = request.getParameter("userName");
            String pasw = request.getParameter("pwd");
            int x = 1;
            UserDatabase db =  new UserDatabase(Conn.getConnection());
            User user = db.login(username, pasw, x);
             HttpSession session=request.getSession();  
            if(user!=null){ 
                response.sendRedirect("adminPaneli.jsp");
            }else{
                String mesaj = "mesaj";
                session.setAttribute("mesaj",mesaj); 
                response.sendRedirect("adminLogin.jsp");
            }
        processRequest(request, response);
    }
/**
     * Handles the HTTP <code>POST</code> method.
     *
     * @param request servlet request
     * @param response servlet response
     * @throws ServletException if a servlet-specific error occurs
     * @throws IOException if an I/O error occurs
     */
Handles the HTTP POST method.
@param request servlet request
@param response servlet response
@throws ServletException if a servlet-specific error occurs
@throws IOException if an I/O error occurs
Handles the HTTP POST method . @param request servlet request @param response servlet response @throws ServletException if a servlet - specific error occurs @throws IOException if an I / O error occurs
@Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
            String username = request.getParameter("userName");
            String pasw = request.getParameter("pwd");
            int x = 1;
            UserDatabase db =  new UserDatabase(Conn.getConnection());
            User user = db.login(username, pasw, x);
             HttpSession session=request.getSession();  
            if(user!=null){ 
                response.sendRedirect("adminPaneli.jsp");
            }else{
                String mesaj = "mesaj";
                session.setAttribute("mesaj",mesaj); 
                response.sendRedirect("adminLogin.jsp");
            }
        processRequest(request, response);
    }
@ Override protected void doPost ( HttpServletRequest request , HttpServletResponse response ) throws ServletException , IOException { String username = request . getParameter ( "userName" ) ; String pasw = request . getParameter ( "pwd" ) ; int x = 1 ; UserDatabase db = new UserDatabase ( Conn . getConnection ( ) ) ; User user = db . login ( username , pasw , x ) ; HttpSession session = request . getSession ( ) ; if ( user != null ) { response . sendRedirect ( "adminPaneli.jsp" ) ; } else { String mesaj = "mesaj" ; session . setAttribute ( "mesaj" , mesaj ) ; response . sendRedirect ( "adminLogin.jsp" ) ; } processRequest ( request , response ) ; }
Handles the HTTP <code>POST</code> method.
Handles the HTTP <code > POST< / code > method .