jspc

Description

Ant task to run the jsp compiler.

This task takes the given jsp files and compiles them into java files. It is then up to the user to compile the java files into classes.

Parameters

The Task has the following attributes: * classes and classpath (the classpath to use when running the jsp * compiler). *

This task supports the nested elements classpath (A Path) and * classpathref (A Reference) which can be used in preference to the * attribute classpath, if the jsp compiler is not already in the ant * classpath.

Attribute Description Required
destdir Where to place the generated files. They are located under here according to the given package name. Yes
srcdir Where to look for source jsp files. Yes
verbose The verbose flag to pass to the compiler. No
package Name of the destination package for generated java classes. No
ieplugin Java Plugin classid for Internet Explorer. No
mapped (boolean) Generate separate write() calls for each HTML line in the JSP. No
classpath The classpath to use to run the jsp compiler, if the compiler is not already in the ant classpath. This can also be specified by the nested element classpath (a Path). No
classpathref A Reference. As per classpath No

This task is a directory based task, like javac, so the jsp files to be compiled are located as java files are by javac.

Example

<jspc srcdir="${basedir}/src/war"
      destdir="${basedir}/gensrc"
      package="com.i3sp.jsp"
      verbose="9">
  <include name="**\/*.jsp" />
</jspc>

Notes

At present, this task only supports the jasper compiler. In future, other compilers will be supported by setting the jsp.compiler property.

The jasper compiler option -webapp is not supported. Using the package 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.


Copyright © 2000,2001 Apache Software Foundation. All rights Reserved.