Source Code Cross Referenced for Constants.java in  » Portal » Open-Portal » com » sun » portal » providers » jsp » jasper3 » jasper » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Portal » Open Portal » com.sun.portal.providers.jsp.jasper3.jasper 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * The Apache Software License, Version 1.1
003:         *
004:         * Copyright (c) 1999 The Apache Software Foundation.  All rights 
005:         * reserved.
006:         *
007:         * Redistribution and use in source and binary forms, with or without
008:         * modification, are permitted provided that the following conditions
009:         * are met:
010:         *
011:         * 1. Redistributions of source code must retain the above copyright
012:         *    notice, this list of conditions and the following disclaimer. 
013:         *
014:         * 2. Redistributions in binary form must reproduce the above copyright
015:         *    notice, this list of conditions and the following disclaimer in
016:         *    the documentation and/or other materials provided with the
017:         *    distribution.
018:         *
019:         * 3. The end-user documentation included with the redistribution, if
020:         *    any, must include the following acknowlegement:  
021:         *       "This product includes software developed by the 
022:         *        Apache Software Foundation (http://www.apache.org/)."
023:         *    Alternately, this acknowlegement may appear in the software itself,
024:         *    if and wherever such third-party acknowlegements normally appear.
025:         *
026:         * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
027:         *    Foundation" must not be used to endorse or promote products derived
028:         *    from this software without prior written permission. For written 
029:         *    permission, please contact apache@apache.org.
030:         *
031:         * 5. Products derived from this software may not be called "Apache"
032:         *    nor may "Apache" appear in their names without prior written
033:         *    permission of the Apache Group.
034:         *
035:         * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
036:         * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
037:         * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
038:         * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
039:         * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
040:         * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
041:         * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
042:         * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
043:         * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
044:         * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
045:         * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
046:         * SUCH DAMAGE.
047:         * ====================================================================
048:         *
049:         * This software consists of voluntary contributions made by many
050:         * individuals on behalf of the Apache Software Foundation.  For more
051:         * information on the Apache Software Foundation, please see
052:         * <http://www.apache.org/>.
053:         *
054:         *
055:         */
056:
057:        package com.sun.portal.providers.jsp.jasper3.jasper;
058:
059:        import java.util.ResourceBundle;
060:        import java.util.MissingResourceException;
061:        import java.text.MessageFormat;
062:
063:        import com.sun.portal.providers.jsp.jasper3.tomcat.logging.Logger;
064:
065:        /**
066:         * Some constants and other global data that are used by the compiler and the runtime.
067:         *
068:         * @author Anil K. Vijendran
069:         * @author Harish Prabandham
070:         */
071:        public class Constants {
072:            /**
073:             * The base class of the generated servlets. 
074:             */
075:            public static final String JSP_SERVLET_BASE = "HttpJspBase";
076:
077:            /**
078:             * _jspService is the name of the method that is called by 
079:             * HttpJspBase.service(). This is where most of the code generated
080:             * from JSPs go.
081:             */
082:            public static final String SERVICE_METHOD_NAME = "_jspService";
083:
084:            /**
085:             * Default servlet content type.
086:             */
087:            public static final String SERVLET_CONTENT_TYPE = "text/html";
088:
089:            /**
090:             * These classes/packages are automatically imported by the
091:             * generated code. 
092:             *
093:             * FIXME: Need to trim this to what is there in PR2 and verify
094:             *        with all our generators -akv.
095:             */
096:            public static final String[] STANDARD_IMPORTS = {
097:                    "javax.servlet.*", "javax.servlet.http.*",
098:                    "javax.servlet.jsp.*", "javax.servlet.jsp.tagext.*",
099:                    "java.io.PrintWriter", "java.io.IOException",
100:                    "java.io.FileInputStream", "java.io.ObjectInputStream",
101:                    "java.util.Vector",
102:                    "com.sun.portal.providers.jsp.jasper3.jasper.runtime.*",
103:                    "java.beans.*",
104:                    "com.sun.portal.providers.jsp.jasper3.jasper.JasperException" };
105:
106:            /**
107:             * ServletContext attribute for classpath. This is tomcat specific. 
108:             * Other servlet engines can choose to have this attribute if they 
109:             * want to have this JSP engine running on them. 
110:             */
111:            public static final String SERVLET_CLASSPATH = "com.iplanet.server.http.servlet.classpath";
112:
113:            /**
114:             * iPlanet specific attribute for checking on jsp freshness
115:             */
116:            public static final String JSP_RELOAD_INTERVAL = "com.iplanet.server.http.servlet.reload-interval";
117:
118:            /**
119:             * ServletContext attribute for classpath. This is tomcat specific. 
120:             * Other servlet engines can choose to have this attribute if they 
121:             * want to have this JSP engine running on them. 
122:             */
123:            public static final String SERVLET_CLASS_LOADER = "com.iplanet.server.http.servlet.classloader";
124:
125:            /**
126:             * Default size of the JSP buffer.
127:             */
128:            public static final int K = 1024;
129:            public static final int DEFAULT_BUFFER_SIZE = 8 * K;
130:
131:            /**
132:             * The query parameter that causes the JSP engine to just
133:             * pregenerated the servlet but not invoke it. 
134:             */
135:            public static final String PRECOMPILE = "jsp_precompile";
136:
137:            /**
138:             * Servlet context and request attributes that the JSP engine
139:             * uses. 
140:             */
141:            public static final String INC_REQUEST_URI = "javax.servlet.include.request_uri";
142:            public static final String INC_SERVLET_PATH = "javax.servlet.include.servlet_path";
143:            public static final String TMP_DIR = "javax.servlet.context.tempdir";
144:
145:            /**
146:             * ProtectionDomain to use for JspLoader defineClass() for current
147:             * Context when using a SecurityManager.
148:             */
149:            public static final String ATTRIB_JSP_ProtectionDomain = "tomcat.context.jsp.protection_domain";
150:
151:            /**
152:             * A token which is embedded in file names of the generated
153:             * servlet. 
154:             */
155:            public static final String JSP_TOKEN = "_jsp";
156:
157:            /**
158:             * The directory in which jsp servlets are generated
159:             */
160:            public static final String JSP_DIR = "_jsps";
161:
162:            /**
163:             * ID and location of the DTD for tag library descriptors. 
164:             */
165:            public static final String TAGLIB_DTD_PUBLIC_ID = "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN";
166:            public static final String TAGLIB_DTD_RESOURCE = "/com/sun/portal/providers/jsp/jasper3/jasper/resources/web-jsptaglib_1_1.dtd";
167:
168:            /**
169:             * ID and location of the DTD for web-app deployment descriptors. 
170:             */
171:            public static final String WEBAPP_DTD_PUBLIC_ID = "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN";
172:            public static final String WEBAPP_DTD_RESOURCE = "/com/sun/portal/providers/jsp/jasper3/jasper/resources/web.dtd";
173:
174:            /**
175:             * Default URLs to download the pluging for Netscape and IE.
176:             */
177:            public static final String NS_PLUGIN_URL = "http://java.sun.com/products/plugin/";
178:
179:            public static final String IE_PLUGIN_URL = "http://java.sun.com/products/plugin/1.2.2/jinstall-1_2_2-win.cab#Version=1,2,2,0";
180:
181:            /**
182:             * Default plugin class ID for versions 4 and 5 of IE.
183:             */
184:            public static final String IE_PLUGIN_CLASSID = "clsid:8AD9C840-044E-11D1-B3E9-00805F499D93";
185:
186:            /**
187:             * This is where all our error messages and such are stored. 
188:             */
189:            private static ResourceBundle resources;
190:
191:            private static void initResources() throws MissingResourceException {
192:                resources = ResourceBundle
193:                        .getBundle("com.sun.portal.providers.jsp.jasper3.jasper.resources.messages");
194:            }
195:
196:            /**
197:             * Get hold of a "message" or any string from our resources
198:             * database. 
199:             */
200:            public static final String getString(String key) {
201:                return getString(key, null);
202:            }
203:
204:            /**
205:             * Format the string that is looked up using "key" using "args". 
206:             */
207:            public static final String getString(String key, Object[] args)
208:                    throws MissingResourceException {
209:                if (resources == null)
210:                    initResources();
211:
212:                String msg = resources.getString(key);
213:                if (args == null)
214:                    return msg;
215:                MessageFormat form = new MessageFormat(msg);
216:                return form.format(args);
217:            }
218:
219:            /** 
220:             * Print a message into standard error with a certain verbosity
221:             * level. 
222:             * 
223:             * @param key is used to look up the text for the message (using
224:             *            getString()). 
225:             * @param verbosityLevel is used to determine if this output is
226:             *                       appropriate for the current verbosity
227:             *                       level. 
228:             */
229:            public static final void message(String key, int verbosityLevel) {
230:                message(key, null, verbosityLevel);
231:            }
232:
233:            /**
234:             * Print a message into standard error with a certain verbosity
235:             * level after formatting it using "args". 
236:             *
237:             * @param key is used to look up the message. 
238:             * @param args is used to format the message. 
239:             * @param verbosityLevel is used to determine if this output is
240:             *                       appropriate for the current verbosity
241:             *                       level. 
242:             */
243:            public static final void message(String key, Object[] args,
244:                    int verbosityLevel) {
245:                if (jasperLog == null)
246:                    jasperLog = Logger.getLogger("JASPER_LOG");
247:
248:                if (jasperLog != null)
249:                    jasperLog.log(getString(key, args), verbosityLevel);
250:            }
251:
252:            public static Logger jasperLog = null;
253:        }
w___w___w__._j__a_v__a_2__s.___c_om__ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.