@Override
     public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
        try {          
            Integer idUsuario=(Integer)((HttpServletRequest)servletRequest).getSession().getAttribute("idUsuario");
            if (checkSeguridad(idUsuario,servletRequest)==true) {         
                filterChain.doFilter(servletRequest, servletResponse);
            } else {
                //Prohibido
            }
         }catch(Exception exception){
             exception.printStackTrace();
         }
     }