Here's something I copied from an ant-user message a while ago. Haven't tried it, though. Maybe it will help....
<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"/>
Jake
At 11:48 AM 12/7/2002 +0000, you wrote:
Greetings!
Has any one tried jspc and webapp? I want to precomile jsps and write the servlet-mapping into web.xml. How can I use the above for this purpose.
I am working with ant1.5.1 and jboss+tomcat as my appserver.
Thanks in advance.
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>