protected void processRequest(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
        response.setContentType("text/html;charset=UTF-8");
        PrintWriter out = response.getWriter();
        String customername = request.getParameter("customername");
        String address = request.getParameter("address");
        String phone = request.getParameter("phone");
        String email = request.getParameter("email");
        String username = request.getParameter("username");
        String password = request.getParameter("password");

        customerBean bean = new customerBean();
        customerDAO rd = new customerDAO();
        if (  (customername != null) && (address != null) && (phone != null) && (email != null) && (username != null) && (password != null)) {
            bean.setCustomername(customername);
            bean.setAddress(address);
            bean.setPhone(phone);
            bean.setEmail(email);
            bean.setUsername(username);
            bean.setPassword(password);
        }
        int id = 0;
        try {
            String opn = request.getParameter("opn");
            if (opn.equals("add")) {
                rd.create(bean);
            } else if (opn.equals("update")) {
                id = Integer.parseInt(request.getParameter("customerid"));
                System.out.println(id);
                bean.setCustomerid(id);
                rd.edit(bean);
            } else if (opn.equals("delete")) {
                id = Integer.parseInt(request.getParameter("customerid"));
                bean.setCustomerid(id);
                rd.remove(id);
            }
            response.sendRedirect("customerHome");
        } finally {
        }
    }