protected void processRequest(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
        response.setContentType("text/html;charset=UTF-8");
        PrintWriter out = response.getWriter();
        try {
            /* TODO output your page here. You may use following sample code. */
           if (this.getServletConfig().getServletContext().getAttribute("login") != null
                    && ((Boolean) this.getServletConfig().getServletContext().getAttribute("login"))) {

                if (request.getParameter("email") != null
                        && request.getParameter("email") != "") {
                    Consultas con = new Consultas();
                    String resp = con.seguir((String) this.getServletConfig().getServletContext().getAttribute("email"),(String) request.getParameter("email"));
                    if (resp.equals("OK")) {
                        response.sendRedirect("perfil.jsp");
                    } else {
                        
                        response.sendRedirect("perfil.jsp?mensaje="+resp);
                    }
                } else {
                    
                    response.sendRedirect("perfil.jsp?merror");
                }
            } else {
                String mensaje = "Acceso ilegal al area de seguir";
                response.sendRedirect("error.jsp?mensaje=" + mensaje);
            }
        } catch (SQLException ex) {
            Logger.getLogger(seguir.class.getName()).log(Level.SEVERE, null, ex);
        } catch (ClassNotFoundException ex) {
            Logger.getLogger(seguir.class.getName()).log(Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            Logger.getLogger(seguir.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            Logger.getLogger(seguir.class.getName()).log(Level.SEVERE, null, ex);
        } finally {
            out.close();
        }
    }