1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package org.apache.struts2;
22
23
24 /***
25 * Constants used by Struts. The constants can be used to get or set objects
26 * out of the action context or other collections.
27 *
28 * <p/>
29 *
30 * Example:
31 * <ul><code>ActionContext.getContext().put(HTTP_REQUEST, request);</code></ul>
32 * <p/>
33 * or
34 * <p/>
35 * <ul><code>
36 * ActionContext context = ActionContext.getContext();<br>
37 * HttpServletRequest request = (HttpServletRequest)context.get(HTTP_REQUEST);</code></ul>
38 */
39 public interface StrutsStatics {
40
41 /***
42 * Constant for the HTTP request object.
43 */
44 public static final String HTTP_REQUEST = "com.opensymphony.xwork2.dispatcher.HttpServletRequest";
45
46 /***
47 * Constant for the HTTP response object.
48 */
49 public static final String HTTP_RESPONSE = "com.opensymphony.xwork2.dispatcher.HttpServletResponse";
50
51 /***
52 * Constant for an HTTP {@link javax.servlet.RequestDispatcher request dispatcher}.
53 */
54 public static final String SERVLET_DISPATCHER = "com.opensymphony.xwork2.dispatcher.ServletDispatcher";
55
56 /***
57 * Constant for the {@link javax.servlet.ServletContext servlet context} object.
58 */
59 public static final String SERVLET_CONTEXT = "com.opensymphony.xwork2.dispatcher.ServletContext";
60
61 /***
62 * Constant for the JSP {@link javax.servlet.jsp.PageContext page context}.
63 */
64 public static final String PAGE_CONTEXT = "com.opensymphony.xwork2.dispatcher.PageContext";
65
66 /*** Constant for the PortletContext object */
67 public static final String STRUTS_PORTLET_CONTEXT = "struts.portlet.context";
68 }