01: /*
02: * $Id: StrutsStatics.java 471756 2006-11-06 15:01:43Z husted $
03: *
04: * Licensed to the Apache Software Foundation (ASF) under one
05: * or more contributor license agreements. See the NOTICE file
06: * distributed with this work for additional information
07: * regarding copyright ownership. The ASF licenses this file
08: * to you under the Apache License, Version 2.0 (the
09: * "License"); you may not use this file except in compliance
10: * with the License. You may obtain a copy of the License at
11: *
12: * http://www.apache.org/licenses/LICENSE-2.0
13: *
14: * Unless required by applicable law or agreed to in writing,
15: * software distributed under the License is distributed on an
16: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17: * KIND, either express or implied. See the License for the
18: * specific language governing permissions and limitations
19: * under the License.
20: */
21: package org.apache.struts2;
22:
23: /**
24: * Constants used by Struts. The constants can be used to get or set objects
25: * out of the action context or other collections.
26: *
27: * <p/>
28: *
29: * Example:
30: * <ul><code>ActionContext.getContext().put(HTTP_REQUEST, request);</code></ul>
31: * <p/>
32: * or
33: * <p/>
34: * <ul><code>
35: * ActionContext context = ActionContext.getContext();<br>
36: * HttpServletRequest request = (HttpServletRequest)context.get(HTTP_REQUEST);</code></ul>
37: */
38: public interface StrutsStatics {
39:
40: /**
41: * Constant for the HTTP request object.
42: */
43: public static final String HTTP_REQUEST = "com.opensymphony.xwork2.dispatcher.HttpServletRequest";
44:
45: /**
46: * Constant for the HTTP response object.
47: */
48: public static final String HTTP_RESPONSE = "com.opensymphony.xwork2.dispatcher.HttpServletResponse";
49:
50: /**
51: * Constant for an HTTP {@link javax.servlet.RequestDispatcher request dispatcher}.
52: */
53: public static final String SERVLET_DISPATCHER = "com.opensymphony.xwork2.dispatcher.ServletDispatcher";
54:
55: /**
56: * Constant for the {@link javax.servlet.ServletContext servlet context} object.
57: */
58: public static final String SERVLET_CONTEXT = "com.opensymphony.xwork2.dispatcher.ServletContext";
59:
60: /**
61: * Constant for the JSP {@link javax.servlet.jsp.PageContext page context}.
62: */
63: public static final String PAGE_CONTEXT = "com.opensymphony.xwork2.dispatcher.PageContext";
64:
65: /** Constant for the PortletContext object */
66: public static final String STRUTS_PORTLET_CONTEXT = "struts.portlet.context";
67: }
|