1 18 19 package org.apache.struts.webapp.tiles.test; 20 21 import javax.servlet.http.HttpServletRequest ; 22 import javax.servlet.http.HttpServletResponse ; 23 24 import org.apache.struts.action.Action; 25 import org.apache.struts.action.ActionForm; 26 import org.apache.struts.action.ActionForward; 27 import org.apache.struts.action.ActionMapping; 28 import org.apache.struts.tiles.ComponentContext; 29 30 31 48 49 public final class NoForward extends Action { 50 51 52 53 55 56 67 public ActionForward execute(ActionMapping mapping, 68 ActionForm form, 69 HttpServletRequest request, 70 HttpServletResponse response) 71 throws Exception { 72 ComponentContext context = ComponentContext.getContext( request ); 74 if( context == null ) 75 { ComponentContext tileContext = new ComponentContext( ); 79 ComponentContext.setContext( tileContext, request); 80 } 81 return (mapping.findForward("success")); 82 } 83 84 85 } 86 | Popular Tags |