1 package org.itracker.web.actions; 2 3 import org.apache.struts.action.*; 4 import org.itracker.web.actions.base.ItrackerBaseAction; 5 6 import javax.servlet.http.HttpServletRequest; 7 import javax.servlet.http.HttpServletResponse; 8 9 10 public class UnauthorizedAction extends ItrackerBaseAction { 11 12 private final static String UNAUTHORIZED = "unauthorized"; 13 14 public ActionForward execute(ActionMapping mapping, ActionForm form, 15 HttpServletRequest request, HttpServletResponse response) 16 throws Exception { 17 ActionErrors messages = new ActionErrors(); 18 messages.add(ActionMessages.GLOBAL_MESSAGE, 19 new ActionMessage("itracker.web.error.unauthorized")); 20 saveErrors(request, messages); 21 return mapping.findForward(UNAUTHORIZED); 22 } 23 24 }