tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Subir Sengupta <>
Subject RE: build.xml for Ant/JspC
Date Thu, 03 Oct 2002 17:51:42 GMT
Here's a snippet of my build.xml (but I don't have a refid).  It seems to
work though.

     <!-- JSPC:  pre-compile JSPs -->
     <target name="jspc">
          <java classname="org.apache.jasper.JspC">
                    <pathelement location="${java.home}/lib/tools.jar"/>
                    <fileset dir="/home/subir/www/tomcat/server/lib">
                         <include name="**/*.jar"/>
                    <fileset dir="/home/subir/www/tomcat/common/lib">
                         <include name="**/*.jar"/>
                    <fileset dir="/home/subir/www/tomcat/lib">
                         <include name="**/*.jar"/>
                    <pathelement location="${build.home}/WEB-INF/" />
               <arg value="-d" />
               <arg file="${deploy.home}" />
               <arg value="-v9" />
               <arg value="-webapp" />
               <arg value="${src}" />

Also I found an earlier posting that might help:

Thanks for posting your compiler snippet.

-----Original Message-----
From: Kevin HaleBoyes []
Sent: Thursday, October 03, 2002 5:56 AM
Subject: Re: build.xml for Ant/JspC

> There is a snippet of the build.xml that we use for jsp

I'm lurking on this thread but wanted to ask:
What is your <classpath refid="all-classpath" /> set to?
I've attempted JspC but I get class-not-found errors and when I
resolve them I get problems with the endorsed/sealed XML classes.

In the end I resorted to calling as shipped with Tomcat
as it seems to manage the classpath properly:

    <exec executable="/bin/sh">
        <arg line="${catalina.home}/bin/"/>
        <arg line="jspc"/>
        <arg line="-webapp ${build.home}"/>
        <arg line="-webinc ${build.jspc.home}/webinc.xml"/>
        <arg line="-uriroot ${build.home}"/>
        <arg line="-p com.mydomain"/>
        <arg line="-d ${build.jspc.home}"/>
        <arg line="-v"/>

In answer to another posters question (sorry, I don't remember
who it was), once the above call to finishes I then call
the java compiler as follows:

    <javac srcdir="${build.jspc.home}"
        <classpath refid="compile.classpath"/>
        <include name="**/*.java"/>


Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message