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: /**
10: * StrutsCommand wrapper for 'include' attribute specified
11: * in ActionMapping
12: */
13: public class IncludeCommand extends StrutsCommand {
14:
15: private String includeURI;
16:
17: public IncludeCommand(HttpServletRequest request, String include) {
18: super (request);
19: includeURI = include;
20: }
21:
22: /**
23: * In Struts' RequestProcessor, include URI returned by ActionMapping
24: * is being procesed by internalModuleRelativeInclude method. This method
25: * is also doing the same.
26: * @param processor
27: * @param request
28: * @param response
29: * @throws IOException
30: * @throws ServletException
31: */
32: public void execute(RequestProcessor processor,
33: HttpServletRequest request, HttpServletResponse response)
34: throws IOException, ServletException {
35: processor.internalModuleRelativeInclude(includeURI,
36: getRequest(request), response);
37: }
38: }
|