01: /*
02: * Copyright 1999,2004 The Apache Software Foundation.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
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 org.araneaframework.http.core;
18:
19: /**
20: * Some constants and other global data that are used by the compiler and the runtime.
21: *
22: * @author Anil K. Vijendran
23: * @author Harish Prabandham
24: * @author Shawn Bayern
25: * @author Mark Roth
26: *
27: * Copied from Apache Tomcat for internal use. Use the original version (http://tomcat.apache.org/)
28: * if you need it outside Aranea.
29: */
30: public class Constants {
31: /**
32: * Default servlet content type.
33: */
34: public static final String SERVLET_CONTENT_TYPE = "text/html";
35:
36: /**
37: * Default size of the JSP buffer.
38: */
39: public static final int K = 1024;
40: public static final int DEFAULT_BUFFER_SIZE = 8 * K;
41:
42: /**
43: * Default size for the tag buffers.
44: */
45: public static final int DEFAULT_TAG_BUFFER_SIZE = 512;
46:
47: /**
48: * Default tag handler pool size.
49: */
50: public static final int MAX_POOL_SIZE = 5;
51:
52: /**
53: * Servlet context and request attributes that the JSP engine
54: * uses.
55: */
56: public static final String INC_REQUEST_URI = "javax.servlet.include.request_uri";
57: public static final String INC_SERVLET_PATH = "javax.servlet.include.servlet_path";
58: public static final String TMP_DIR = "javax.servlet.context.tempdir";
59: public static final String FORWARD_SEEN = "javax.servlet.forward.seen";
60:
61: /**
62: * Public Id and the Resource path (of the cached copy)
63: * of the DTDs for tag library descriptors.
64: */
65: public static final String TAGLIB_DTD_PUBLIC_ID_11 = "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN";
66: public static final String TAGLIB_DTD_RESOURCE_PATH_11 = "/cache/web-jsptaglibrary_1_1.dtd";
67: public static final String TAGLIB_DTD_PUBLIC_ID_12 = "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN";
68: public static final String TAGLIB_DTD_RESOURCE_PATH_12 = "/cache/web-jsptaglibrary_1_2.dtd";
69:
70: /**
71: * Public Id and the Resource path (of the cached copy)
72: * of the DTDs for web application deployment descriptors
73: */
74: public static final String WEBAPP_DTD_PUBLIC_ID_22 = "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN";
75: public static final String WEBAPP_DTD_RESOURCE_PATH_22 = "/cache/web-app_2_2.dtd";
76: public static final String WEBAPP_DTD_PUBLIC_ID_23 = "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN";
77: public static final String WEBAPP_DTD_RESOURCE_PATH_23 = "/cache/web-app_2_3.dtd";
78:
79: /**
80: * List of the Public IDs that we cache, and their
81: * associated location. This is used by
82: * an EntityResolver to return the location of the
83: * cached copy of a DTD.
84: */
85: public static final String[] CACHED_DTD_PUBLIC_IDS = {
86: TAGLIB_DTD_PUBLIC_ID_11, TAGLIB_DTD_PUBLIC_ID_12,
87: WEBAPP_DTD_PUBLIC_ID_22, WEBAPP_DTD_PUBLIC_ID_23, };
88: public static final String[] CACHED_DTD_RESOURCE_PATHS = {
89: TAGLIB_DTD_RESOURCE_PATH_11, TAGLIB_DTD_RESOURCE_PATH_12,
90: WEBAPP_DTD_RESOURCE_PATH_22, WEBAPP_DTD_RESOURCE_PATH_23, };
91: }
|