001: /* Attributes.java
002:
003: {{IS_NOTE
004: Purpose:
005:
006: Description:
007:
008: History:
009: Wed Nov 17 15:05:17 2004, Created by tomyeh
010: }}IS_NOTE
011:
012: Copyright (C) 2004 Potix Corporation. All Rights Reserved.
013:
014: {{IS_RIGHT
015: This program is distributed under GPL Version 2.0 in the hope that
016: it will be useful, but WITHOUT ANY WARRANTY.
017: }}IS_RIGHT
018: */
019: package org.zkoss.web;
020:
021: /**
022: * Definition of contstants used as attributes and parameters acrossing
023: * requests.
024: *
025: * @author tomyeh
026: */
027: public class Attributes {
028: /** Don't construct it. All members are static. */
029: protected Attributes() {
030: }
031:
032: /** The title (String) of a servlet or a portal.
033: * Stored as an attribute of the request.
034: */
035: public static final String TITLE = "px_title";
036:
037: /** The attribute used to store the preferred locale (Locale) in a session.
038: */
039: public static final String PREFERRED_LOCALE = "px_preferred_locale";
040: /** The attribute used to store the preferred time zone (TimeZone) in a session.
041: */
042: public static final String PREFERRED_TIME_ZONE = "px_preferred_time_zone";
043:
044: /** The attribute name that contains the alert passed from
045: * another request {@link org.zkoss.web.servlet.http.Https#sendRedirect}.
046: * It is automatically reset after the next request is responsed.
047: * In JSP, web authors use
048: * <c:object name="i.alert" scope="request"> to access it.
049: */
050: public static final String ALERT = "px_alert";
051: /** Denote the type of {@link #ALERT}.
052: * It could be "error", "warning" and undefined.
053: * It is used by JSP page to do more accurate page layout.
054: */
055: public static final String ALERT_TYPE = "px_alert_type";
056:
057: /** "j_domain" as part of the j_check_security request.
058: */
059: public static final String J_DOMAIN = "j_domain";
060: /** "j_remember_me" as part of the j_check_security request.
061: */
062: public static final String J_REMEMBER_ME = "j_remember_me";
063:
064: /** The attribute used to pass parameters from the caller that invokes
065: * Servlets.include() or Servlets.forward()
066: * with {@link org.zkoss.web.servlet.Servlets#PASS_THRU_ATTR}.
067: */
068: public static final String ARG = "arg";
069:
070: //-- Standard constants --//
071: /** The included context path; set by the servlet container.
072: * @see org.zkoss.web.servlet.http.Https#getThisServletPath
073: * @see org.zkoss.web.servlet.http.Https#getOriginServletPath
074: */
075: public static final String INCLUDE_CONTEXT_PATH = "javax.servlet.include.context_path";
076: /** The included servlet path; set by the servlet container.
077: * @see org.zkoss.web.servlet.http.Https#getThisServletPath
078: * @see org.zkoss.web.servlet.http.Https#getOriginServletPath
079: */
080: public static final String INCLUDE_SERVLET_PATH = "javax.servlet.include.servlet_path";
081: /** The included request URI; set by the servlet container.
082: * @see org.zkoss.web.servlet.http.Https#getThisRequestURI
083: */
084: public static final String INCLUDE_REQUEST_URI = "javax.servlet.include.request_uri";
085: /** The included servlet path; set by the servlet container.
086: * @see org.zkoss.web.servlet.http.Https#getThisPathInfo
087: * @see org.zkoss.web.servlet.http.Https#getOriginPathInfo
088: */
089: public static final String INCLUDE_PATH_INFO = "javax.servlet.include.path_info";
090: /** The included servlet path; set by the servlet container.
091: * @see org.zkoss.web.servlet.http.Https#getThisQueryString
092: * @see org.zkoss.web.servlet.http.Https#getOriginQueryString
093: */
094: public static final String INCLUDE_QUERY_STRING = "javax.servlet.include.query_string";
095:
096: /** The original context path that forwards this page; set by the servlet container.
097: * @see org.zkoss.web.servlet.http.Https#getThisServletPath
098: * @see org.zkoss.web.servlet.http.Https#getOriginServletPath
099: */
100: public static final String FORWARD_CONTEXT_PATH = "javax.servlet.forward.context_path";
101: /** The original servlet path that forwards this page; set by the servlet container.
102: * @see org.zkoss.web.servlet.http.Https#getThisServletPath
103: * @see org.zkoss.web.servlet.http.Https#getOriginServletPath
104: */
105: public static final String FORWARD_SERVLET_PATH = "javax.servlet.forward.servlet_path";
106: /** The original request URI that forwards this page; set by the servlet container.
107: * @see org.zkoss.web.servlet.http.Https#getThisRequestURI
108: */
109: public static final String FORWARD_REQUEST_URI = "javax.servlet.forward.request_uri";
110: /** The original servlet path that forwards this page; set by the servlet container.
111: * @see org.zkoss.web.servlet.http.Https#getThisPathInfo
112: * @see org.zkoss.web.servlet.http.Https#getOriginPathInfo
113: */
114: public static final String FORWARD_PATH_INFO = "javax.servlet.forward.path_info";
115: /** The original servlet path that forwards this page; set by the servlet container.
116: * @see org.zkoss.web.servlet.http.Https#getThisQueryString
117: * @see org.zkoss.web.servlet.http.Https#getOriginQueryString
118: */
119: public static final String FORWARD_QUERY_STRING = "javax.servlet.forward.query_string";
120: /** The attribute to hold the exception, if any.
121: */
122: public static final String ERROR_EXCEPTION = "javax.servlet.error.exception";
123: }
|