protected void processRequest(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
        response.setContentType("text/html;charset=UTF-8");
        PrintWriter out = response.getWriter();
        String odid = request.getParameter("odid");
        String oid = request.getParameter("oid");
        String productid = request.getParameter("productid");
        String quantity = request.getParameter("quantity");

        orderdetailsBean bean = new orderdetailsBean();
        orderdetailsDAO rd = new orderdetailsDAO();
        if ((odid != null) && (oid != null) && (productid != null) && (quantity != null)) {
            bean.setOdid(Integer.parseInt(odid));
            bean.setOid(Integer.parseInt(oid));
            bean.setProductid(Integer.parseInt(productid));
            bean.setQuantity(Integer.parseInt(quantity));
        }
        int id = 0;
        try {
            String opn = request.getParameter("opn");
            if (opn.equals("add")) {
                rd.create(bean);
            } else if (opn.equals("update")) {
                id = Integer.parseInt(odid);
                System.out.println(id);
                bean.setOdid(id);
                rd.edit(bean);
            } else if (opn.equals("delete")) {
                id = Integer.parseInt(odid);
                bean.setOdid(id);
                rd.remove(id);
            }
            response.sendRedirect("orderdetailsView");
        } finally {
        }
    }