01: package org.apache.struts.action;
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.config.ModuleConfig;
10:
11: public class PortletRequestProcessor extends RequestProcessor implements
12: IPortletStrutsLifecycle {
13:
14: private IPortletStrutsLifecycle _portletLifecycle;
15:
16: public void init(ActionServlet servlet, ModuleConfig moduleConfig)
17: throws ServletException {
18:
19: super .init(servlet, moduleConfig);
20: _portletLifecycle = new PortletStrutsLifecycle(this , log,
21: moduleConfig);
22: }
23:
24: public void process(HttpServletRequest request,
25: HttpServletResponse response) throws IOException,
26: ServletException {
27:
28: _portletLifecycle.processAction(request, response);
29: _portletLifecycle.render(request, response);
30: }
31:
32: public void processAction(HttpServletRequest request,
33: HttpServletResponse response) throws IOException,
34: ServletException {
35:
36: _portletLifecycle.processAction(request, response);
37: }
38:
39: public void render(HttpServletRequest request,
40: HttpServletResponse response) throws IOException,
41: ServletException {
42:
43: _portletLifecycle.render(request, response);
44: }
45:
46: /**
47: * Forward is not allowed for portlet.
48: * @param uri
49: * @param req
50: * @param res
51: * @throws IOException
52: * @throws ServletException
53: */
54: protected void doForward(String uri, HttpServletRequest req,
55: HttpServletResponse res) throws IOException,
56: ServletException {
57:
58: doInclude(uri, req, res);
59: }
60: }
|