HttpSession session =
( (HttpServletRequest) request ).getSession();
RequestDispatcher dispatcher = null;
Funcionario funcionario=
(Funcionario) session.getAttribute("funcionario");
if( funcionario == null || ( funcionario.getCargo() != Cargo.GERENTE ) ){
dispatcher = request.getRequestDispatcher("/login.jsf");
}
else{
dispatcher = request.getRequestDispatcher(servletRequest.getServletPath());