You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by st...@apache.org on 2003/02/21 07:36:43 UTC
cvs commit: ant/docs/manual/OptionalTasks jspc.html
stevel 2003/02/20 22:36:43
Modified: docs/manual/OptionalTasks Tag: ANT_15_BRANCH jspc.html
Log:
jspc sync w/ 1.6 version. Not 100% aligned as ant1.5 creates classloaders different-like.
Revision Changes Path
No revision
No revision
1.6.2.6 +58 -10 ant/docs/manual/OptionalTasks/jspc.html
Index: jspc.html
===================================================================
RCS file: /home/cvs/ant/docs/manual/OptionalTasks/jspc.html,v
retrieving revision 1.6.2.5
retrieving revision 1.6.2.6
diff -u -r1.6.2.5 -r1.6.2.6
--- jspc.html 16 Jan 2003 12:14:11 -0000 1.6.2.5
+++ jspc.html 21 Feb 2003 06:36:43 -0000 1.6.2.6
@@ -22,10 +22,24 @@
in class or taglib dependencies, or <jsp:include> references.
<p>
-By default the task uses the Jasper JSP compiler. This
-means the task needs jasper.jar and jasper-runtime.jar, which come with
-builds of Tomcat 4/Catalina from the
-<a href="http://jakarta.apache.org/tomcat/">Jakarta Tomcat project</a>
+By default the task uses the Jasper JSP compiler. This
+means the task needs jasper.jar and jasper-runtime.jar, which come with
+builds of Tomcat 4/Catalina from the
+<a href="http://jakarta.apache.org/tomcat/">Jakarta Tomcat project</a>.
+We recommend Tomcat version 4.1.x for the most robust version of jasper.
+
+<p>
+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.
+
+</p>
<h3>Parameters</h3>
@@ -61,8 +75,9 @@
</tr>
<tr>
<td valign="top">compiler</td>
- <td valign="top">class name of a JSP compiler adapter</td>
- <td valign="top" align="center">No</td>
+ <td valign="top">class name of a JSP compiler adapter,
+ such as "jasper" or "jasper41"</td>
+ <td valign="top" align="center">No -defaults to "jasper"</td>
</tr>
<tr>
<td valign="top">ieplugin</td>
@@ -81,7 +96,7 @@
This can also be specified
by the nested element <code>classpath</code>
<a href="../using.html#path">Path</a>).</td>
- <td valign="top" align="center">No</td>
+ <td valign="top" align="center">No, but it seems to work better when used</td>
</tr>
<tr>
<td valign="top">classpathref</td>
@@ -108,10 +123,35 @@
<td valign="top">uriroot</td>
<td valign="top">
The root directory that uri files should be resolved
- against.
+ against.
+ </td>
+ <td valign="top" align="center">No</td>
+ </tr>
+ <tr>
+ <td valign="top">compiler</td>
+ <td valign="top">
+ Class name of jsp compiler adapter to use. Defaults to
+ the standard adapter for Jasper.
</td>
<td valign="top" align="center">No</td>
+ </tr>
+ <tr>
+ <td valign="top">compilerclasspath</td>
+ <td valign="top">The classpath used to find the compiler adapter specified
+ by the <code>compiler</code> attribute.</td>
+ <td valign="top" align="center">No</td>
+ </tr>
+ <tr>
+ <td valign="top">webinc</td>
+ <td valign="top">Output file name for the fraction of web.xml that lists servlets.</td>
+ <td valign="top" align="center">No</td>
+ </tr>
+ <tr>
+ <td valign="top">webxml</td>
+ <td valign="top">File name for web.xml to be generated</td>
+ <td valign="top" align="center">No</td>
</tr>
+
</table>
<P>The <tt>mapped</tt> option will, if set to true, split the JSP text content into a
@@ -181,6 +221,7 @@
<jspc srcdir="${basedir}/src/war"
destdir="${basedir}/gensrc"
package="com.i3sp.jsp"
+ compiler="jasper41"
verbose="9">
<include name="**/*.jsp" />
</jspc>
@@ -193,6 +234,7 @@
destdir="interim"
verbose="1"
srcdir="src"
+ compiler="jasper41"
package="com.i3sp.jsp">
<include name="**/*.jsp" />
</jspc>
@@ -214,8 +256,14 @@
<p><h4>Notes</h4>
Using the <code>package</code> attribute it is possible to identify the resulting
-java files and thus do full dependency checking - this task only rebuilds
-java files if their jsp file has been modified.
+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
+with some versions of jasper. By default the checking supports tomcat 4.0.x
+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.
+
<p>
Jasper generates JSP pages against the JSP1.2 specification -an implementation of
version 2.3 of the servlet specification is needed to compile or run the java code.