On 08-09 15:21, Rossen Raykov wrote:
> Try something like:
>
> <property name="build.compiler" value="jikes"/>
> <path id="compile.classpath">
> <pathelement location="${java.home}/jre/lib/rt.jar"/>
> <pathelement location="${java.home}/lib/tools.jar"/>
> <pathelement location="${tomcat.lib}/jasper-compiler.jar"/>
> <pathelement location="${tomcat.lib}/jasper-runtime.jar"/>
> <pathelement location="${tomcat.common.lib}/xerces.jar"/>
> <pathelement location="${tomcat.common.lib}/servlet.jar"/>
> ...
> </path>
> <!-- store the generated java classes here -->
> <property name="generated.java.classes.dir" value="/some/path" />
> <!-- generate java classes for you JSPs and mapping web.xml -->
> <java
> classname="org.apache.jasper.JspC"
> classpath="${compile.classpath}"
> fork="true"
> failonerror="true">
> <arg value="-d" />
> <arg value="${generated.java.classes.dir}" />
> <arg value="-webinc" />
> <arg value="/path/to/the/generated/web.xml" />
> <arg value="-webapp" />
> <arg value="/path/to/you/webapp/dir" />
> <jvmarg
> value="-Djava.endorsed.dirs=${tomcat.home}/bin:${tomcat.home}/common/endorse
> d" />
> <jvmarg value="-Djasper.home=${tomcat.home}" />
> <jvmarg value="-Xms194m" />
> <jvmarg value="-Xmx194m" />
> </java>
> <!-- compile generated java classes and store them in their finall location
> -->
> <javac
> srcdir="${generated.java.classes.dir}"
> destdir="/path/to/you/webapp/dir/WEB-INF/classes"
> optimize="off"
> debug="on"
> depend="on"
> classpath="${compile.classpath}"
> includeJavaRuntime="on"/>
>
> Regards,
> Rossen
Thanks, Rossen.
However, I still have two problems when I run the above.
1. The resulting .class file does not have the XXX$jsp.class naming that
results from having Tomcat compile it on-the-fly. Thus, Tomcat doesn't use
my pre-compiled tax.
2. Also, I'm having trouble with variables being shared across pages, i.e.,
pages that define a variable, and then use the same variable in an included
page. This is valid, but the precompilation bombs on this.
TIA,
--
Sean LeBlanc - Nutros.com
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>