1 package pl.agh.iosr.ballamigos.webapp.actions; 2 3 import javax.servlet.http.HttpServletRequest; 4 import javax.servlet.http.HttpServletResponse; 5 6 import org.apache.struts.action.Action; 7 import org.apache.struts.action.ActionForm; 8 import org.apache.struts.action.ActionForward; 9 import org.apache.struts.action.ActionMapping; 10 11 /***A struts action class used only to redirect the player to the "New game" page with the new match name form. 12 * 13 * @author Piotr 14 * 15 */ 16 public class NewGameAction extends BallAmigosAction { 17 18 public ActionForward execute(ActionMapping mapping, 19 ActionForm form, 20 HttpServletRequest request, 21 HttpServletResponse response) 22 throws Exception { 23 if(playerLoggedIn(request)) return(mapping.findForward("success")); 24 else return(mapping.findForward("failure")); 25 } 26 27 }