protected void processRequest(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
        response.setContentType("text/html;charset=UTF-8");
         response.setCharacterEncoding("UTF-8");
 request.setCharacterEncoding("UTF-8");
        String msj_exito = "Catálogo agregado exitosamente";
        String msj_error = "Error al agregar al catálogo";
        
        HttpSession sesion = request.getSession(true);
        String tipo_sesion = (String)sesion.getAttribute("identidad");
        
        if (agregaCatalogo(request, response)) {
            response.sendRedirect(tipo_sesion + ".jsp?mensaje=" + URLEncoder.encode(msj_exito, "UTF-8") + "&exito=true");
        } else {
            response.sendRedirect(tipo_sesion + ".jsp?mensaje=" + URLEncoder.encode(msj_error, "UTF-8") + "&exito=false");
        }
        
    }