001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017:
018: package org.apache.jasper;
019:
020: import java.io.File;
021: import java.util.Map;
022:
023: import org.apache.jasper.compiler.JspConfig;
024: import org.apache.jasper.compiler.TagPluginManager;
025: import org.apache.jasper.compiler.TldLocationsCache;
026:
027: /**
028: * A class to hold all init parameters specific to the JSP engine.
029: *
030: * @author Anil K. Vijendran
031: * @author Hans Bergsten
032: * @author Pierre Delisle
033: */
034: public interface Options {
035:
036: /**
037: * Returns true if Jasper issues a compilation error instead of a runtime
038: * Instantiation error if the class attribute specified in useBean action
039: * is invalid.
040: */
041: public boolean getErrorOnUseBeanInvalidClassAttribute();
042:
043: /**
044: * Are we keeping generated code around?
045: */
046: public boolean getKeepGenerated();
047:
048: /**
049: * Returns true if tag handler pooling is enabled, false otherwise.
050: */
051: public boolean isPoolingEnabled();
052:
053: /**
054: * Are we supporting HTML mapped servlets?
055: */
056: public boolean getMappedFile();
057:
058: /**
059: * Should errors be sent to client or thrown into stderr?
060: */
061: public boolean getSendErrorToClient();
062:
063: /**
064: * Should we include debug information in compiled class?
065: */
066: public boolean getClassDebugInfo();
067:
068: /**
069: * Background compile thread check interval in seconds
070: */
071: public int getCheckInterval();
072:
073: /**
074: * Is Jasper being used in development mode?
075: */
076: public boolean getDevelopment();
077:
078: /**
079: * Should we include a source fragment in exception messages, which could be displayed
080: * to the developer ?
081: */
082: public boolean getDisplaySourceFragment();
083:
084: /**
085: * Is the generation of SMAP info for JSR45 debugging suppressed?
086: */
087: public boolean isSmapSuppressed();
088:
089: /**
090: * Indicates whether SMAP info for JSR45 debugging should be dumped to a
091: * file.
092: * Ignored is suppressSmap() is true
093: */
094: public boolean isSmapDumped();
095:
096: /**
097: * Should white spaces between directives or actions be trimmed?
098: */
099: public boolean getTrimSpaces();
100:
101: /**
102: * Class ID for use in the plugin tag when the browser is IE.
103: */
104: public String getIeClassId();
105:
106: /**
107: * What is my scratch dir?
108: */
109: public File getScratchDir();
110:
111: /**
112: * What classpath should I use while compiling the servlets
113: * generated from JSP files?
114: */
115: public String getClassPath();
116:
117: /**
118: * Compiler to use.
119: */
120: public String getCompiler();
121:
122: /**
123: * The compiler target VM, e.g. 1.1, 1.2, 1.3, 1.4, or 1.5.
124: */
125: public String getCompilerTargetVM();
126:
127: /**
128: * Compiler source VM, e.g. 1.3, 1.4, or 1.5.
129: */
130: public String getCompilerSourceVM();
131:
132: /**
133: * Java compiler class to use.
134: */
135: public String getCompilerClassName();
136:
137: /**
138: * The cache for the location of the TLD's
139: * for the various tag libraries 'exposed'
140: * by the web application.
141: * A tag library is 'exposed' either explicitely in
142: * web.xml or implicitely via the uri tag in the TLD
143: * of a taglib deployed in a jar file (WEB-INF/lib).
144: *
145: * @return the instance of the TldLocationsCache
146: * for the web-application.
147: */
148: public TldLocationsCache getTldLocationsCache();
149:
150: /**
151: * Java platform encoding to generate the JSP
152: * page servlet.
153: */
154: public String getJavaEncoding();
155:
156: /**
157: * boolean flag to tell Ant whether to fork JSP page compilations.
158: */
159: public boolean getFork();
160:
161: /**
162: * Obtain JSP configuration informantion specified in web.xml.
163: */
164: public JspConfig getJspConfig();
165:
166: /**
167: * Is generation of X-Powered-By response header enabled/disabled?
168: */
169: public boolean isXpoweredBy();
170:
171: /**
172: * Obtain a Tag Plugin Manager
173: */
174: public TagPluginManager getTagPluginManager();
175:
176: /**
177: * Are Text strings to be generated as char arrays?
178: */
179: public boolean genStringAsCharArray();
180:
181: /**
182: * Modification test interval.
183: */
184: public int getModificationTestInterval();
185:
186: /**
187: * Is caching enabled (used for precompilation).
188: */
189: public boolean isCaching();
190:
191: /**
192: * The web-application wide cache for the returned TreeNode
193: * by parseXMLDocument in TagLibraryInfoImpl.parseTLD,
194: * if isCaching returns true.
195: *
196: * @return the Map(String uri, TreeNode tld) instance.
197: */
198: public Map getCache();
199:
200: }
|