Hi Jordan,
there is an Ant task called "jspc" to compile JSPs into Java files, which
you can then compile using the "javac" task. Here is a sample target like I
am using it.
<target name="compile-jsp" description="Compile all JSP files">
<mkdir dir="${build.jsp.dir}"/>
<path id="jasper.class.path">
<pathelement
path="${jboss.home}/catalina/lib/jasper-compiler.jar"/>
<pathelement path="${jboss.home}/catalina/lib/jasper-runtime.jar"/>
<pathelement path="${lib.dir}/servlet.jar"/>
<!-- include other required libraries here, e.g. struts.jar -->
</path>
<!-- Compile JSP files to Java files -->
<jspc srcdir="${web.src.dir}"
destdir="${build.jsp.dir}"
classpathref="jasper.class.path"
verbose="1">
<include name="**/*.jsp" />
</jspc>
<!-- Compile generated Java files -->
<javac srcdir="${build.jsp.dir}"
destdir="${build.jsp.dir}"
classpathref="jasper.class.path">
<include name="**/*.java"/>
</javac>
</target>
Hope that helps.
Leander
-----Ursprüngliche Nachricht-----
Von: middlegen-user-***@lists.sourceforge.net
[mailto:middlegen-user-***@lists.sourceforge.net]Im Auftrag von Jordan
Thomas
Gesendet: Freitag, 31. Januar 2003 12:13
An: middlegen-***@lists.sourceforge.net
Betreff: [Middlegen-user] Ant and JSP compile
Hi,
How do I compile all of my JSP's with ant? I am using tomcat and JBoss. Any
pointers, example code would be most appreciated.
thanks
Jordan
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com