1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| public ActionForward execute(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException {
HttpSession session = request.getSession();
//Session expirée
if(session.getAttribute("LOGIN")==null){
ActionErrors errors = new ActionErrors();
errors.add(ActionErrors.GLOBAL_ERROR, new ActionError("errors.sessionexpiree"));
if(!errors.isEmpty())
saveErrors(request,errors);
return mapping.findForward("echec");
}
//redirection vers la vue appropriee
return (mapping.findForward("welcome"));
} |