The servlet which implements Jasper is configured using init parameters in your global$CATALINA_BASE/conf/web.xml
.
- checkInterval - If development is false and reloading is true, background compiles are enabled. checkInterval is the time in seconds between checks to see if a JSP page needs to be recompiled. Default
300
seconds. - compiler - Which compiler Ant should use to compile JSP pages. See the Ant documentation for more information. If the value is not set, then the default Eclipse JDT Java compiler will be used instead of using Ant. No default value.
- classdebuginfo - Should the class file be compiled with debugging information?
true
orfalse
, defaulttrue
. - classpath - What class path should I use while compiling generated servlets? By default the classpath is created dynamically based on the current web application.
- compilerSourceVM - What JDK version are the source files compatible with? (Default JDK 1.4)
- compilerTargetVM - What JDK version are the generated files compatible with? (Default JDK 1.4)
- development - Is Jasper used in development mode (will check for JSP modification on every access)?
true
orfalse
, defaulttrue
. - enablePooling - Determines whether tag handler pooling is enabled.
true
orfalse
, defaulttrue
. - engineOptionsClass - Allows specifying the Options class used to configure Jasper. If not present, the default EmbeddedServletOptions will be used.
- ieClassId - The class-id value to be sent to Internet Explorer when using <jsp:plugin> tags. Default
clsid:8AD9C840-044E-11D1-B3E9-00805F499D93
. - fork - Have Ant fork JSP page compiles so they are performed in a seperate JVM from Tomcat?
true
orfalse
, defaulttrue
. - javaEncoding - Java file encoding to use for generating java source files. Default
UTF8
. - genStrAsCharArray - Should text strings be generated as char arrays, to improve performance in some cases? Default
false
. - keepgenerated - Should we keep the generated Java source code for each page instead of deleting it?
true
orfalse
, defaulttrue
. - mappedfile - Should we generate static content with one print statement per input line, to ease debugging?
true
orfalse
, defaulttrue
. - modificationTestInterval - Checks for modification for a given JSP file (and all its dependent files) will be performed only once every specified amount of seconds. Setting this to 0 will cause the JSP to be checked on every access. Default is
4
seconds. - reloading - Should Jasper check for modified JSPs?
true
orfalse
, defaultfalse
. - scratchdir - What scratch directory should we use when compiling JSP pages? Default is the work directory for the current web application.
- trimSpaces - Should white spaces in template text between actions or directives be trimmed ?, default
false
.
The Java compiler from Eclipse JDT in included as the default compiler. It is an advanced Java compiler which will load all dependencies from the Tomcat class loader, which will help tremendously when compiling on large installations with tens of JARs. On fast servers, this will allow sub-second recompilation cycles for even large JSP pages. This new compiler will be updated to support the Java 5 syntax as soon as possible.
Apache Ant, which was used in previous Tomcat releases, can be used instead instead of the new compiler by simply removing the common/lib/jasper-compiler-jdt.jar
file, and placing the ant.jar
file from the latest Ant distribution in the common/lib
folder. If you do this, you also need to use the "javac" argument to catalina.sh.
留言列表