1 18 19 package org.apache.struts.tiles.actions; 20 21 import javax.servlet.ServletException ; 22 import javax.servlet.http.HttpServletRequest ; 23 import javax.servlet.http.HttpServletResponse ; 24 25 import org.apache.struts.action.Action; 26 import org.apache.struts.action.ActionForm; 27 import org.apache.struts.action.ActionForward; 28 import org.apache.struts.action.ActionMapping; 29 import org.apache.struts.tiles.ComponentContext; 30 31 41 public abstract class TilesAction extends Action { 42 43 57 public ActionForward execute( 58 ActionMapping mapping, 59 ActionForm form, 60 HttpServletRequest request, 61 HttpServletResponse response) 62 throws Exception { 63 64 ComponentContext context = ComponentContext.getContext(request); 66 if (context == null) { 67 throw new ServletException ( 68 "Can't find Tile context for '" 69 + this.getClass().getName() 70 + "'. TilesAction subclasses must be called from a Tile"); 71 } 72 73 return this.execute(context, mapping, form, request, response); 74 } 75 76 93 public ActionForward execute( 94 ComponentContext context, 95 ActionMapping mapping, 96 ActionForm form, 97 HttpServletRequest request, 98 HttpServletResponse response) 99 throws Exception { 100 101 return null; 102 } 103 104 } 105 | Popular Tags |