diff --git a/manual/Tasks/jspc.html b/manual/Tasks/jspc.html index 883618679..adad6f24f 100644 --- a/manual/Tasks/jspc.html +++ b/manual/Tasks/jspc.html @@ -25,31 +25,34 @@
+If you use this task with Tomcat's Jasper JSP compiler, you should seriously
+consider using the task shipping with Tomcat instead. This task is only
+tested against Tomcat 4.x. There are known problems with Tomcat 5.x that won't
+get fixed in Ant, please use Tomcat's jspc task instead.
+Instead of relying on container specific JSP-compilers we suggest deploying the
+raw files (*.jsp) and use the container build-in functions: after deploying run
+a test suite
+(e.g. with Cactus
+or HttpUnit) against the deployed
+web application. So you'll get the test result and the compiled JSPs.
+
Apache Ant task to run the JSP compiler and turn JSP pages into Java source. - -
Deprecated if you use this task with Tomcat's Jasper JSP
-compiler, you should seriously consider using the task shipping with
-Tomcat instead. This task is only tested against Tomcat 4.x. There
-are known problems with Tomcat 5.x that won't get fixed in Ant, please
-use Tomcat's jspc task instead.
-Instead of relying on container specific JSP-compilers we suggest deploying
-the raw files (*.jsp) and use the container build-in functions: after deploying run
-a test suite (e.g. with Cactus or
-HttpUnit) against the deployed web
-application. So you'll get the test result and the compiled JSPs.
+
+Apache Ant task to run the JSP compiler and turn JSP pages into Java source.
-
-This task can be used to precompile JSP pages for fast initial invocation
-of JSP pages, deployment on a server without the full JDK installed,
-or simply to syntax check the pages without deploying them.
-In most cases, a javac task is usually the next stage in the build process.
-The task does basic dependency checking to prevent unnecessary recompilation -this
-checking compares source and destination timestamps, and does not factor
-in class or taglib dependencies, or <jsp:include>
references.
+This task can be used to precompile JSP pages for fast initial invocation of JSP
+pages, deployment on a server without the full JDK installed, or simply to
+syntax check the pages without deploying them. In most cases, a javac task is
+usually the next stage in the build process. The task does basic dependency
+checking to prevent unnecessary recompilation - this checking compares source
+and destination timestamps, and does not factor in class or taglib dependencies,
+or <jsp:include>
references.
+
By default the task uses the Jasper JSP compiler. This @@ -60,23 +63,22 @@ and any other Jar files which may be needed in future versions (it changes) We recommend (in March 2003) Tomcat version 4.1.x for the most robust version of Jasper. +
-There are many limitations with this task which partially stem from the -many versions of Jasper, others from implementation 'issues' in the task -(i.e. nobody's willingness to radically change large bits of it to work -around jasper). Because of this and the fact that JSP pages do not have -to be portable across implementations -or versions of implementations- -this task is better used for validating JSP pages before deployment, -rather than precompiling them. For that, just deploy and run your httpunit -junit tests after deployment to compile and test your pages, all in one -go. - +There are many limitations with this task which partially stem from the many +versions of Jasper, others from implementation 'issues' in the task +(i.e. nobody's willingness to radically change large bits of it to work around +jasper). Because of this and the fact that JSP pages do not have to be portable +across implementations -or versions of implementations- this task is better used +for validating JSP pages before deployment, rather than precompiling them. For +that, just deploy and run your httpunit junit tests after deployment to compile +and test your pages, all in one go.
+
The Task has the following attributes:
webinc | Output file name for the fraction of web.xml that lists servlets. | No | -
webxml | File name for web.xml to be generated | No | -
The mapped option will, if set to true, split the JSP text content into a +
The mapped option will, if set to true, split the JSP text content into a one line per call format. There are comments above and below the mapped write calls to localize where in the JSP file each line of text comes from. This can lead to a minor performance degradation (but it is bound by a linear complexity). Without this options all adjacent writes are -concatenated into a single write.
+concatenated into a single write. -The ieplugin option is used by the <jsp:plugin> tags. +
The ieplugin option is used by the <jsp:plugin> tags. If the Java Plug-in COM Class-ID you want to use changes then it can be -specified here. This should not need to be altered.
+specified here. This should not need to be altered. -uriroot specifies the root of the web +
uriroot specifies the root of the web application. This is where all absolute uris will be resolved from. If it is not specified then the first JSP page will be used to derive it. To derive it each parent directory of the first JSP page is searched for a WEB-INF directory, and the directory closest to the JSP page that has one will be used. If none can be found then the directory Jasperc was called from will be used. This only affects pages -translated from an explicitly declared JSP file -including references -to taglibs
+translated from an explicitly declared JSP file - including references +to taglibs -uribase is used to establish the uri context of +
uribase is used to establish the uri context of relative URI references in the JSP pages. If it does not exist then it is derived from the location of the file relative to the declared or derived value of uriroot. This only affects pages -translated from an explicitly declared JSP file.
+translated from an explicitly declared JSP file.This task is a directory based task, like javac, so the jsp files to be compiled are located as java files are by javac. That is, elements such as includes and excludes can be used directly inside the task declaration. +
- -Elements specific to the jspc task are:- +Elements specific to the jspc task are: +
Using the package
attribute it is possible to identify the resulting
java files and thus do full dependency checking - this task should only rebuild
java files if their jsp file has been modified. However, this only works
@@ -295,14 +301,11 @@ with the "jasper" compiler, set the compiler to "jasper41" for the tomcat4.1.x
dependency checking.
Even when it does work, changes in
.TLD imports or in compile time includes do not get picked up.
-
+
Jasper generates JSP pages against the JSP1.2 specification -a copy of version 2.3 of the servlet specification is needed on the classpath to compile the Java code. - - - +