1 64 65 package com.jcorporate.expresso.core.controller; 66 67 import com.jcorporate.expresso.core.ExpressoConstants; 68 import org.apache.struts.tiles.ComponentContext; 69 import org.apache.struts.tiles.Controller; 70 71 import javax.servlet.ServletContext ; 72 import javax.servlet.ServletException ; 73 import javax.servlet.http.HttpServletRequest ; 74 import javax.servlet.http.HttpServletResponse ; 75 import java.io.IOException ; 76 77 78 87 public abstract class TilesController 88 implements Controller { 89 90 93 public TilesController() { 94 } 95 96 100 public final void perform(ComponentContext context, HttpServletRequest request, 101 HttpServletResponse response, ServletContext servletContext) 102 throws ServletException , IOException { 103 104 ControllerResponse res = (ControllerResponse) request.getAttribute(ExpressoConstants.CONTROLLER_RESPONSE_KEY); 105 ControllerRequest req = (ControllerRequest) res.getRequest(); 106 try { 107 execute(context, req, res, servletContext); 108 } catch (ControllerException ce) { 109 throw new ServletException (ce); 110 } 111 } 112 113 117 public void execute(ComponentContext context, ControllerRequest request, 118 ControllerResponse response, ServletContext servletContext) 119 throws ControllerException { 120 121 } 122 123 } 124 | Popular Tags |