01: package org.apache.struts.action;
02:
03: import java.io.IOException;
04:
05: import javax.servlet.http.HttpServletRequest;
06: import javax.servlet.http.HttpServletResponse;
07: import javax.servlet.ServletException;
08:
09: import org.apache.struts.config.ForwardConfig;
10:
11: /**
12: * ForwardConfigCommand
13: * It is a wrapper class over struts ActionForward (earliar ForwardConfig)
14: * It extends StrutsCommand and implements execute method.
15: */
16:
17: public class ForwardConfigCommand extends StrutsCommand {
18:
19: private ForwardConfig _actionForward;
20:
21: /**
22: * StrutsCommand wrapper for ActionForward class
23: * @param request
24: * @param actionForward
25: */
26: public ForwardConfigCommand(HttpServletRequest request,
27: ForwardConfig actionForward) {
28: super (request);
29: _actionForward = actionForward;
30: }
31:
32: /**
33: * In Struts' RequestProcessor, ActionForward object returned by Action class
34: * is being procesed by processForwardConfig method. This method is also
35: * doing the same.
36: * @param processor
37: * @param request
38: * @param response
39: * @throws IOException
40: * @throws ServletException
41: */
42: public void execute(RequestProcessor processor,
43: HttpServletRequest request, HttpServletResponse response)
44: throws IOException, ServletException {
45: processor.processForwardConfig(getRequest(request), response,
46: _actionForward);
47: }
48: }
|