1 18 19 package org.apache.struts.webapp.tiles.tutorial; 20 21 import javax.servlet.http.HttpServletRequest ; 22 import javax.servlet.http.HttpServletResponse ; 23 import org.apache.struts.action.Action; 24 import org.apache.struts.action.ActionForm; 25 import org.apache.struts.action.ActionForward; 26 import org.apache.struts.action.ActionMapping; 27 28 public class ForwardExampleAction extends Action { 29 30 45 public ActionForward execute( 46 ActionMapping mapping, 47 ActionForm form, 48 HttpServletRequest request, 49 HttpServletResponse response) 50 throws Exception { 51 String success = request.getParameter( "success" ); 52 if( success != null ) 53 return (mapping.findForward("success")); 54 55 return (mapping.findForward("failure")); 56 } 57 58 } 59 | Popular Tags |