01: package org.apache.struts.tiles;
02:
03: import java.io.IOException;
04:
05: import javax.servlet.ServletException;
06: import javax.servlet.http.HttpServletRequest;
07: import javax.servlet.http.HttpServletResponse;
08:
09: import org.apache.struts.action.IPortletStrutsLifecycle;
10: import org.apache.struts.config.ModuleConfig;
11: import org.apache.struts.tiles.TilesRequestProcessor;
12:
13: import org.apache.struts.action.*;
14:
15: public class PortletTilesRequestProcessor extends TilesRequestProcessor
16: implements IPortletStrutsLifecycle {
17:
18: private IPortletStrutsLifecycle _portletLifecycle;
19:
20: public void init(ActionServlet servlet, ModuleConfig moduleConfig)
21: throws ServletException {
22:
23: super .init(servlet, moduleConfig);
24: _portletLifecycle = new PortletStrutsLifecycle(this , log,
25: moduleConfig);
26: }
27:
28: public void process(HttpServletRequest request,
29: HttpServletResponse response) throws IOException,
30: ServletException {
31:
32: _portletLifecycle.processAction(request, response);
33: _portletLifecycle.render(request, response);
34: }
35:
36: public void processAction(HttpServletRequest request,
37: HttpServletResponse response) throws IOException,
38: ServletException {
39:
40: _portletLifecycle.processAction(request, response);
41: }
42:
43: public void render(HttpServletRequest request,
44: HttpServletResponse response) throws IOException,
45: ServletException {
46:
47: _portletLifecycle.render(request, response);
48: }
49:
50: protected void doForward(String uri, HttpServletRequest req,
51: HttpServletResponse res) throws IOException,
52: ServletException {
53:
54: doInclude(uri, req, res);
55: }
56: }
|