src/java/Servlet/ServletUser.java
@Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
            String name = request.getParameter("name");
            String surname = request.getParameter("surname");
            String username = request.getParameter("username");
            String pasw = request.getParameter("pwd");
            double bakiye = Double.parseDouble(request.getParameter("bakiye"));
            String mail = request.getParameter("mail");
            
            User userModel = new User(name, surname, username, pasw, mail, bakiye);
            UserDatabase regUser = new UserDatabase(Conn.getConnection());
            
            if (regUser.saveUser(userModel)) {
               response.sendRedirect("userLogin.jsp");
            } else {
                response.sendRedirect("error.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 name = request.getParameter("name");
            String surname = request.getParameter("surname");
            String username = request.getParameter("username");
            String pasw = request.getParameter("pwd");
            double bakiye = Double.parseDouble(request.getParameter("bakiye"));
            String mail = request.getParameter("mail");
            User userModel = new User(name, surname, username, pasw, mail, bakiye);
            UserDatabase regUser = new UserDatabase(Conn.getConnection());
            if (regUser.saveUser(userModel)) {
               response.sendRedirect("userLogin.jsp");
            } else {
                response.sendRedirect("error.jsp");
              }
        processRequest(request, response);
    }
@ Override protected void doPost ( HttpServletRequest request , HttpServletResponse response ) throws ServletException , IOException { String name = request . getParameter ( "name" ) ; String surname = request . getParameter ( "surname" ) ; String username = request . getParameter ( "username" ) ; String pasw = request . getParameter ( "pwd" ) ; double bakiye = Double . parseDouble ( request . getParameter ( "bakiye" ) ) ; String mail = request . getParameter ( "mail" ) ; User userModel = new User ( name , surname , username , pasw , mail , bakiye ) ; UserDatabase regUser = new UserDatabase ( Conn . getConnection ( ) ) ; if ( regUser . saveUser ( userModel ) ) { response . sendRedirect ( "userLogin.jsp" ) ; } else { response . sendRedirect ( "error.jsp" ) ; } processRequest ( request , response ) ; }
Handles the HTTP <code>POST</code> method.
Handles the HTTP <code > POST< / code > method .