upwork/Internet Mediatech/Web App/PortaleDipendenti/src/java/UpdateUserServlet.java
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
        UserDAO user = new UserDAO();
        String fullName = request.getParameter("fullName");
        String userName = request.getParameter("username");
        String email = request.getParameter("email");
        String address = request.getParameter("address");
        String city = request.getParameter("city");
        String zip = request.getParameter("zip");
        String strAdmin = request.getParameter("admin");
        boolean admin=false;
        if(strAdmin!=null){
            admin=true;
        }
        //String sId = request.getParameter("id");
        int id = Integer.parseInt(request.getParameter("id"));
        if (user.updateUser(id, fullName, userName, email, address, city, zip,admin)) {
            response.sendRedirect("userList.jsp");
        }
    }
/**
     * Processes requests for both HTTP <code>GET</code> and <code>POST</code>
     * methods.
     *
     * @param request servlet request
     * @param response servlet response
     * @throws ServletException if a servlet-specific error occurs
     * @throws IOException if an I/O error occurs
     */
Processes requests for both HTTP GET and POST
methods.

@param request servlet request
@param response servlet response
@throws ServletException if a servlet-specific error occurs
@throws IOException if an I/O error occurs
Processes requests for both HTTP GET and POST methods . @param request servlet request @param response servlet response @throws ServletException if a servlet - specific error occurs @throws IOException if an I / O error occurs
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
        UserDAO user = new UserDAO();
        String fullName = request.getParameter("fullName");
        String userName = request.getParameter("username");
        String email = request.getParameter("email");
        String address = request.getParameter("address");
        String city = request.getParameter("city");
        String zip = request.getParameter("zip");
        String strAdmin = request.getParameter("admin");
        boolean admin=false;
        if(strAdmin!=null){
            admin=true;
        }
        int id = Integer.parseInt(request.getParameter("id"));
        if (user.updateUser(id, fullName, userName, email, address, city, zip,admin)) {
            response.sendRedirect("userList.jsp");
        }
    }
protected void processRequest ( HttpServletRequest request , HttpServletResponse response ) throws ServletException , IOException { UserDAO user = new UserDAO ( ) ; String fullName = request . getParameter ( "fullName" ) ; String userName = request . getParameter ( "username" ) ; String email = request . getParameter ( "email" ) ; String address = request . getParameter ( "address" ) ; String city = request . getParameter ( "city" ) ; String zip = request . getParameter ( "zip" ) ; String strAdmin = request . getParameter ( "admin" ) ; boolean admin = false ; if ( strAdmin != null ) { admin = true ; } int id = Integer . parseInt ( request . getParameter ( "id" ) ) ; if ( user . updateUser ( id , fullName , userName , email , address , city , zip , admin ) ) { response . sendRedirect ( "userList.jsp" ) ; } }
Processes requests for both HTTP <code>GET</code> and <code>POST</code>
 methods.
Processes requests for both HTTP <code > GET< / code > and <code > POST< / code > methods .
//String sId = request.getParameter("id");