KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > jasper > Constants


1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */

17
18 package org.apache.jasper;
19
20
21 /**
22  * Some constants and other global data that are used by the compiler and the runtime.
23  *
24  * @author Anil K. Vijendran
25  * @author Harish Prabandham
26  * @author Shawn Bayern
27  * @author Mark Roth
28  */

29 public class Constants {
30     
31     /**
32      * The base class of the generated servlets.
33      */

34     public static final String JavaDoc JSP_SERVLET_BASE =
35         System.getProperty("org.apache.jasper.Constants.JSP_SERVLET_BASE", "org.apache.jasper.runtime.HttpJspBase");
36
37     /**
38      * _jspService is the name of the method that is called by
39      * HttpJspBase.service(). This is where most of the code generated
40      * from JSPs go.
41      */

42     public static final String JavaDoc SERVICE_METHOD_NAME =
43         System.getProperty("org.apache.jasper.Constants.SERVICE_METHOD_NAME", "_jspService");
44
45     /**
46      * Default servlet content type.
47      */

48     public static final String JavaDoc SERVLET_CONTENT_TYPE = "text/html";
49
50     /**
51      * These classes/packages are automatically imported by the
52      * generated code.
53      */

54     public static final String JavaDoc[] STANDARD_IMPORTS = {
55     "javax.servlet.*",
56     "javax.servlet.http.*",
57     "javax.servlet.jsp.*"
58     };
59
60     /**
61      * ServletContext attribute for classpath. This is tomcat specific.
62      * Other servlet engines may choose to support this attribute if they
63      * want to have this JSP engine running on them.
64      */

65     public static final String JavaDoc SERVLET_CLASSPATH =
66         System.getProperty("org.apache.jasper.Constants.SERVLET_CLASSPATH", "org.apache.catalina.jsp_classpath");
67
68     /**
69      * Request attribute for <code>&lt;jsp-file&gt;</code> element of a
70      * servlet definition. If present on a request, this overrides the
71      * value returned by <code>request.getServletPath()</code> to select
72      * the JSP page to be executed.
73      */

74     public static final String JavaDoc JSP_FILE =
75         System.getProperty("org.apache.jasper.Constants.JSP_FILE", "org.apache.catalina.jsp_file");
76
77
78     /**
79      * Default size of the JSP buffer.
80      */

81     public static final int DEFAULT_BUFFER_SIZE = 8 * 1024;
82
83     /**
84      * Default size for the tag buffers.
85      */

86     public static final int DEFAULT_TAG_BUFFER_SIZE = 512;
87
88     /**
89      * Default tag handler pool size.
90      */

91     public static final int MAX_POOL_SIZE = 5;
92
93     /**
94      * The query parameter that causes the JSP engine to just
95      * pregenerated the servlet but not invoke it.
96      */

97     public static final String JavaDoc PRECOMPILE =
98         System.getProperty("org.apache.jasper.Constants.PRECOMPILE", "jsp_precompile");
99
100     /**
101      * The default package name for compiled jsp pages.
102      */

103     public static final String JavaDoc JSP_PACKAGE_NAME =
104         System.getProperty("org.apache.jasper.Constants.JSP_PACKAGE_NAME", "org.apache.jsp");
105
106     /**
107      * The default package name for tag handlers generated from tag files
108      */

109     public static final String JavaDoc TAG_FILE_PACKAGE_NAME =
110         System.getProperty("org.apache.jasper.Constants.TAG_FILE_PACKAGE_NAME", "org.apache.jsp.tag");
111
112     /**
113      * Servlet context and request attributes that the JSP engine
114      * uses.
115      */

116     public static final String JavaDoc INC_SERVLET_PATH = "javax.servlet.include.servlet_path";
117     public static final String JavaDoc TMP_DIR = "javax.servlet.context.tempdir";
118
119     // Must be kept in sync with org/apache/catalina/Globals.java
120
public static final String JavaDoc ALT_DD_ATTR =
121         System.getProperty("org.apache.jasper.Constants.ALT_DD_ATTR", "org.apache.catalina.deploy.alt_dd");
122
123     /**
124      * Public Id and the Resource path (of the cached copy)
125      * of the DTDs for tag library descriptors.
126      */

127     public static final String JavaDoc TAGLIB_DTD_PUBLIC_ID_11 =
128     "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN";
129     public static final String JavaDoc TAGLIB_DTD_RESOURCE_PATH_11 =
130     "/javax/servlet/jsp/resources/web-jsptaglibrary_1_1.dtd";
131     public static final String JavaDoc TAGLIB_DTD_PUBLIC_ID_12 =
132     "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN";
133     public static final String JavaDoc TAGLIB_DTD_RESOURCE_PATH_12 =
134     "/javax/servlet/jsp/resources/web-jsptaglibrary_1_2.dtd";
135
136     /**
137      * Public Id and the Resource path (of the cached copy)
138      * of the DTDs for web application deployment descriptors
139      */

140     public static final String JavaDoc WEBAPP_DTD_PUBLIC_ID_22 =
141     "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN";
142     public static final String JavaDoc WEBAPP_DTD_RESOURCE_PATH_22 =
143     "/javax/servlet/resources/web-app_2_2.dtd";
144     public static final String JavaDoc WEBAPP_DTD_PUBLIC_ID_23 =
145     "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN";
146     public static final String JavaDoc WEBAPP_DTD_RESOURCE_PATH_23 =
147     "/javax/servlet/resources/web-app_2_3.dtd";
148
149     /**
150      * List of the Public IDs that we cache, and their
151      * associated location. This is used by
152      * an EntityResolver to return the location of the
153      * cached copy of a DTD.
154      */

155     public static final String JavaDoc[] CACHED_DTD_PUBLIC_IDS = {
156     TAGLIB_DTD_PUBLIC_ID_11,
157     TAGLIB_DTD_PUBLIC_ID_12,
158     WEBAPP_DTD_PUBLIC_ID_22,
159     WEBAPP_DTD_PUBLIC_ID_23,
160     };
161     public static final String JavaDoc[] CACHED_DTD_RESOURCE_PATHS = {
162     TAGLIB_DTD_RESOURCE_PATH_11,
163     TAGLIB_DTD_RESOURCE_PATH_12,
164     WEBAPP_DTD_RESOURCE_PATH_22,
165     WEBAPP_DTD_RESOURCE_PATH_23,
166     };
167     
168     /**
169      * Default URLs to download the pluging for Netscape and IE.
170      */

171     public static final String JavaDoc NS_PLUGIN_URL =
172         "http://java.sun.com/products/plugin/";
173
174     public static final String JavaDoc IE_PLUGIN_URL =
175         "http://java.sun.com/products/plugin/1.2.2/jinstall-1_2_2-win.cab#Version=1,2,2,0";
176
177     /**
178      * Prefix to use for generated temporary variable names
179      */

180     public static final String JavaDoc TEMP_VARIABLE_NAME_PREFIX =
181         System.getProperty("org.apache.jasper.Constants.TEMP_VARIABLE_NAME_PREFIX", "_jspx_temp");
182
183     /**
184      * A replacement char for "\$".
185      * XXX This is a hack to avoid changing EL interpreter to recognize "\$"
186      */

187     public static final char ESC = '\u001b';
188     public static final String JavaDoc ESCStr = "'\\u001b'";
189
190 }
191
Popular Tags