You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Baz <ba...@goodconsultants.com> on 2004/04/01 16:51:37 UTC
Please help with JSP precompilation with tomcat
All,
I am currently using tomcat 5 but i just cannot get the precompilation
working. If i switch to tomcat 4, the error changed. Anyone has experience
in JSP precompilation?
Thanks
Barry
When using tomcat 4:
compilejsp:
[jspc] Compiling 44 source
files/home/barry/p4/main/server/src/java/policyS
erver/jspc/java
[jasperc] error:org.apache.jasper.JasperException: Unrecognized
option: -v1.
Use -help for help.
[jasperc] at org.apache.jasper.JspC.setArgs(JspC.java:310)
[jasperc] at org.apache.jasper.JspC.main(JspC.java:234)
What do i need to do to make it working in tomcat 5? Here is the build.xml:
<property name="build.jspc.java.dir"
location="jspc/java"/>
<property name="build.jspc.classes.dir"
location="jspc/classes"/>
<property name="war.expanded.dir"
location="./unwar"/>
<path id="jasper.classpath">
<pathelement location="./servlet.jar"/>
<!--
<pathelement
location="${catalina.home}/common/lib/jasper-compiler.jar"/>
<pathelement location="${catalina.home}/common/lib/jasper-runtime.jar"/>
-->
<fileset dir="${catalina.home}/common/lib">
<include name="*.jar"/>
</fileset>
</path>
<target name="compilejsp">
<mkdir dir="${build.jspc.java.dir}"/>
<mkdir dir="${build.jspc.classes.dir}"/>
<jspc srcdir="${war.expanded.dir}" destdir="${build.jspc.java.dir}">
<include name="*jsp"/>
<include name="**/*jsp"/>
<classpath refid="jasper.classpath"/>
</jspc>
<javac debug="${build.debug}" includeAntRuntime="false"
srcdir="${build.jspc.java.dir}"
destdir="${build.jspc.classes.dir}">
<classpath>
<path
location="unwar/WEB-INF/classes"/>
<fileset dir="unwar/WEB-INF/lib">
<include name="**/*.jar"/>
<include name="*.jar"/>
</fileset>
<path refid="jasper.classpath"/>
</classpath>
</javac>
</target>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org