KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > icesoft > jasper > Constants


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

16
17 package com.icesoft.jasper;
18
19
20 /**
21  * Some constants and other global data that are used by the compiler and the
22  * 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      * The base class of the generated servlets.
32      */

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

41     public static final String JavaDoc SERVICE_METHOD_NAME = "_jspService";
42
43     /**
44      * Default servlet content type.
45      */

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

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

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

71     public static final String JavaDoc JSP_FILE = "org.apache.catalina.jsp_file";
72
73
74     /**
75      * FIXME ServletContext attribute for class loader. This is tomcat specific.
76      * Other servlet engines can choose to have this attribute if they want to
77      * have this JSP engine running on them.
78      */

79     //public static final String SERVLET_CLASS_LOADER = "org.apache.tomcat.classloader";
80
public static final String JavaDoc SERVLET_CLASS_LOADER =
81             "org.apache.catalina.classloader";
82
83     /**
84      * Default size of the JSP buffer.
85      */

86     public static final int K = 1024;
87     public static final int DEFAULT_BUFFER_SIZE = 8 * K;
88
89     /**
90      * Default size for the tag buffers.
91      */

92     public static final int DEFAULT_TAG_BUFFER_SIZE = 512;
93
94     /**
95      * Default tag handler pool size.
96      */

97     public static final int MAX_POOL_SIZE = 5;
98
99     /**
100      * The query parameter that causes the JSP engine to just pregenerated the
101      * servlet but not invoke it.
102      */

103     public static final String JavaDoc PRECOMPILE = "jsp_precompile";
104
105     /**
106      * The default package name for compiled jsp pages.
107      */

108     public static final String JavaDoc JSP_PACKAGE_NAME = "org.apache.jsp";
109
110     /**
111      * The default package name for tag handlers generated from tag files
112      */

113     public static final String JavaDoc TAG_FILE_PACKAGE_NAME = "org.apache.jsp.tag";
114
115     /**
116      * Servlet context and request attributes that the JSP engine uses.
117      */

118     public static final String JavaDoc INC_CONTEXT_PATH =
119             "javax.servlet.include.context_path";
120     public static final String JavaDoc INC_PATH_INFO =
121             "javax.servlet.include.path_info";
122     public static final String JavaDoc INC_QUERY_STRING =
123             "javax.servlet.include.query_string";
124     public static final String JavaDoc INC_REQUEST_URI =
125             "javax.servlet.include.request_uri";
126     public static final String JavaDoc INC_SERVLET_PATH =
127             "javax.servlet.include.servlet_path";
128
129     public static final String JavaDoc[] INC_CONSTANTS =
130             {INC_CONTEXT_PATH,
131              INC_PATH_INFO,
132              INC_QUERY_STRING,
133              INC_REQUEST_URI,
134              INC_SERVLET_PATH};
135
136     public static final String JavaDoc PORTLET_KEY = "com.icesoft.faces.PORTLET";
137     public static final String JavaDoc VIEW_KEY = "com.icesoft.faces.VIEW";
138     public static final String JavaDoc EDIT_KEY = "com.icesoft.faces.EDIT";
139     public static final String JavaDoc HELP_KEY = "com.icesoft.faces.HELP";
140     public static final String JavaDoc NAMESPACE_KEY = "com.icesoft.faces.NAMESPACE";
141
142     public static final String JavaDoc TMP_DIR = "javax.servlet.context.tempdir";
143     public static final String JavaDoc FORWARD_SEEN = "javax.servlet.forward.seen";
144
145     /**
146      * Public Id and the Resource path (of the cached copy) of the DTDs for tag
147      * library descriptors.
148      */

149     public static final String JavaDoc TAGLIB_DTD_PUBLIC_ID_11 =
150             "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN";
151     public static final String JavaDoc TAGLIB_DTD_RESOURCE_PATH_11 =
152             "/com/icesoft/jasper/web-jsptaglibrary_1_1.dtd";
153     public static final String JavaDoc TAGLIB_DTD_PUBLIC_ID_12 =
154             "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN";
155     public static final String JavaDoc TAGLIB_DTD_RESOURCE_PATH_12 =
156             "/com/icesoft/jasper/web-jsptaglibrary_1_2.dtd";
157
158     /**
159      * Public Id and the Resource path (of the cached copy) of the DTDs for web
160      * application deployment descriptors
161      */

162     public static final String JavaDoc WEBAPP_DTD_PUBLIC_ID_22 =
163             "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN";
164     public static final String JavaDoc WEBAPP_DTD_RESOURCE_PATH_22 =
165             "/com/icesoft/jasper/web-app_2_2.dtd";
166     public static final String JavaDoc WEBAPP_DTD_PUBLIC_ID_23 =
167             "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN";
168     public static final String JavaDoc WEBAPP_DTD_RESOURCE_PATH_23 =
169             "/com/icesoft/jasper/web-app_2_3.dtd";
170
171     /**
172      * List of the Public IDs that we cache, and their associated location. This
173      * is used by an EntityResolver to return the location of the cached copy of
174      * a DTD.
175      */

176     public static final String JavaDoc[] CACHED_DTD_PUBLIC_IDS = {
177             TAGLIB_DTD_PUBLIC_ID_11,
178             TAGLIB_DTD_PUBLIC_ID_12,
179             WEBAPP_DTD_PUBLIC_ID_22,
180             WEBAPP_DTD_PUBLIC_ID_23,
181     };
182     public static final String JavaDoc[] CACHED_DTD_RESOURCE_PATHS = {
183             TAGLIB_DTD_RESOURCE_PATH_11,
184             TAGLIB_DTD_RESOURCE_PATH_12,
185             WEBAPP_DTD_RESOURCE_PATH_22,
186             WEBAPP_DTD_RESOURCE_PATH_23,
187     };
188
189     /**
190      * Default URLs to download the pluging for Netscape and IE.
191      */

192     public static final String JavaDoc NS_PLUGIN_URL =
193             "http://java.sun.com/products/plugin/";
194
195     public static final String JavaDoc IE_PLUGIN_URL =
196             "http://java.sun.com/products/plugin/1.2.2/jinstall-1_2_2-win.cab#Version=1,2,2,0";
197
198     /**
199      * Prefix to use for generated temporary variable names
200      */

201     public static final String JavaDoc TEMP_VARIABLE_NAME_PREFIX =
202             "_jspx_temp";
203
204     /**
205      * A replacement char for "\$". XXX This is a hack to avoid changing EL
206      * interpreter to recognize "\$"
207      */

208     public static final char ESC = '\u001b';
209     public static final String JavaDoc ESCStr = "'\\u001b'";
210 }
211
212
Popular Tags