001: /*
002: * $Id: Globals.java 471754 2006-11-06 14:55:09Z husted $
003: *
004: * Licensed to the Apache Software Foundation (ASF) under one
005: * or more contributor license agreements. See the NOTICE file
006: * distributed with this work for additional information
007: * regarding copyright ownership. The ASF licenses this file
008: * to you under the Apache License, Version 2.0 (the
009: * "License"); you may not use this file except in compliance
010: * with the License. You may obtain a copy of the License at
011: *
012: * http://www.apache.org/licenses/LICENSE-2.0
013: *
014: * Unless required by applicable law or agreed to in writing,
015: * software distributed under the License is distributed on an
016: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
017: * KIND, either express or implied. See the License for the
018: * specific language governing permissions and limitations
019: * under the License.
020: */
021: package org.apache.struts;
022:
023: import java.io.Serializable;
024:
025: /**
026: * Global manifest constants for the entire Struts Framework.
027: *
028: * @version $Rev: 471754 $ $Date: 2005-06-18 20:27:26 -0400 (Sat, 18 Jun 2005)
029: * $
030: */
031: public class Globals implements Serializable {
032: // ----------------------------------------------------- Manifest Constants
033:
034: /**
035: * The context attributes key under which our <code>ActionServlet</code>
036: * instance will be stored.
037: *
038: * @since Struts 1.1
039: */
040: public static final String ACTION_SERVLET_KEY = "org.apache.struts.action.ACTION_SERVLET";
041:
042: /**
043: * The request attributes key under which a boolean <code>true</code>
044: * value should be stored if this request was cancelled.
045: *
046: * @since Struts 1.1
047: */
048: public static final String CANCEL_KEY = "org.apache.struts.action.CANCEL";
049:
050: /**
051: * <p>The base of the context attributes key under which our
052: * <code>ModuleConfig</code> data structure will be stored. This will be
053: * suffixed with the actual module prefix (including the leading "/"
054: * character) to form the actual attributes key.</p>
055: *
056: * <p>For each request processed by the controller servlet, the
057: * <code>ModuleConfig</code> object for the module selected by the request
058: * URI currently being processed will also be exposed under this key as a
059: * request attribute.</p>
060: *
061: * @since Struts 1.1
062: */
063: public static final String MODULE_KEY = "org.apache.struts.action.MODULE";
064:
065: /**
066: * The ServletContext attribute under which we store the module prefixes
067: * String[].
068: *
069: * @since Struts 1.2
070: */
071: public static final String MODULE_PREFIXES_KEY = "org.apache.struts.globals.MODULE_PREFIXES";
072:
073: /**
074: * The request attribute under which we store the original URI of the
075: * request.
076: *
077: * @since Struts 1.3
078: */
079: public static final String ORIGINAL_URI_KEY = "org.apache.struts.globals.ORIGINAL_URI_KEY";
080:
081: /**
082: * The request attributes key under which your action should store an
083: * <code>org.apache.struts.action.ActionErrors</code> object, if you are
084: * using the corresponding custom tag library elements.
085: */
086: public static final String ERROR_KEY = "org.apache.struts.action.ERROR";
087:
088: /**
089: * The request attributes key under which Struts custom tags might store a
090: * <code>Throwable</code> that caused them to report a JspException at
091: * runtime. This value can be used on an error page to provide more
092: * detailed information about what really went wrong.
093: */
094: public static final String EXCEPTION_KEY = "org.apache.struts.action.EXCEPTION";
095:
096: /**
097: * The session attributes key under which the user's selected
098: * <code>java.util.Locale</code> is stored, if any. If no such attribute
099: * is found, the system default locale will be used when retrieving
100: * internationalized messages. If used, this attribute is typically set
101: * during user login processing.
102: */
103: public static final String LOCALE_KEY = "org.apache.struts.action.LOCALE";
104:
105: /**
106: * The request attributes key under which our <code>org.apache.struts.ActionMapping</code>
107: * instance is passed.
108: */
109: public static final String MAPPING_KEY = "org.apache.struts.action.mapping.instance";
110:
111: /**
112: * The request attributes key under which your action should store an
113: * <code>org.apache.struts.action.ActionMessages</code> object, if you are
114: * using the corresponding custom tag library elements.
115: *
116: * @since Struts 1.1
117: */
118: public static final String MESSAGE_KEY = "org.apache.struts.action.ACTION_MESSAGE";
119:
120: /**
121: * <p>The base of the context attributes key under which our module
122: * <code>MessageResources</code> will be stored. This will be suffixed
123: * with the actual module prefix (including the leading "/" character) to
124: * form the actual resources key.</p>
125: *
126: * <p>For each request processed by the controller servlet, the
127: * <code>MessageResources</code> object for the module selected by the
128: * request URI currently being processed will also be exposed under this
129: * key as a request attribute.</p>
130: */
131: public static final String MESSAGES_KEY = "org.apache.struts.action.MESSAGE";
132:
133: /**
134: * The request attributes key under which our multipart class is stored.
135: */
136: public static final String MULTIPART_KEY = "org.apache.struts.action.mapping.multipartclass";
137:
138: /**
139: * <p>The base of the context attributes key under which an array of
140: * <code>PlugIn</code> instances will be stored. This will be suffixed
141: * with the actual module prefix (including the leading "/" character) to
142: * form the actual attributes key.</p>
143: *
144: * @since Struts 1.1
145: */
146: public static final String PLUG_INS_KEY = "org.apache.struts.action.PLUG_INS";
147:
148: /**
149: * <p>The base of the context attributes key under which our
150: * <code>RequestProcessor</code> instance will be stored. This will be
151: * suffixed with the actual module prefix (including the leading "/"
152: * character) to form the actual attributes key.</p>
153: *
154: * @since Struts 1.1
155: */
156: public static final String REQUEST_PROCESSOR_KEY = "org.apache.struts.action.REQUEST_PROCESSOR";
157:
158: /**
159: * The context attributes key under which we store the mapping defined for
160: * our controller serlet, which will be either a path-mapped pattern
161: * (<code>/action/*</code>) or an extension mapped pattern
162: * (<code>*.do</code>).
163: */
164: public static final String SERVLET_KEY = "org.apache.struts.action.SERVLET_MAPPING";
165:
166: /**
167: * The session attributes key under which our transaction token is stored,
168: * if it is used.
169: */
170: public static final String TRANSACTION_TOKEN_KEY = "org.apache.struts.action.TOKEN";
171:
172: /**
173: * The page attributes key under which xhtml status is stored. This may
174: * be "true" or "false". When set to true, the html tags output xhtml.
175: *
176: * @since Struts 1.1
177: */
178: public static final String XHTML_KEY = "org.apache.struts.globals.XHTML";
179:
180: /**
181: * The name of the taglib package.
182: */
183: public static final String TAGLIB_PACKAGE = "org.apache.struts.taglib.html";
184:
185: /**
186: * The property under which a Cancel button press is reported.
187: */
188: public static final String CANCEL_PROPERTY = TAGLIB_PACKAGE
189: + ".CANCEL";
190:
191: /**
192: * The property under which a Cancel button press is reported, if the
193: * Cancel button is rendered as an image.
194: */
195: public static final String CANCEL_PROPERTY_X = TAGLIB_PACKAGE
196: + ".CANCEL.x";
197:
198: /**
199: * The property under which a transaction token is reported.
200: */
201: public static final String TOKEN_KEY = TAGLIB_PACKAGE + ".TOKEN";
202: }
|