I am experiencing an annoying (but not show-stopping) issue while
trying to use the Catalina ReloadTask Ant task.

I am currently using Ant 1.7, JDK 1.5 (OS X) and Tomcat 5.5.23.

Whenever I make a modification to a JSP, I usually do an 'ant reload'
to push the changes to the build/ directory and force the container to
reload the application.

However, when I refresh the JSP in the browser, the changes don't take
effect, even if I clear the browser cache, etc.  I checked the content
of the build/ directory, the modified file has been copied there.  It
is almost like the container isn't reloading the web app.

I recently moved from JDK 1.4.2, Tomcat 5.0.17 and Ant 1.6.5.  I
didn't experience the problem with that configuration.

Any ideas?  I've included my build.xml file at the bottom for reference.

thanks

-- brian


<?xml version="1.0" ?>
<project name="Import Test" default="compile" basedir=".">

<property file="${user.home}/build.properties" />

<property name="app.name"      value="importtest"/>
<property name="app.path"      value="/${app.name}"/>

<property name="build.home"    value="${basedir}/build"   />
<property name="dist.home"     value="${basedir}/dist"    />
<property name="web.home"      value="${basedir}/web"     />
<property name="src.home"      value="${basedir}/src"     />
<property name="lib.home"      value="${basedir}/src/lib" />

<taskdef name="deploy" classname="org.apache.catalina.ant.DeployTask"   />
<taskdef name="list"    classname="org.apache.catalina.ant.ListTask"     />
<taskdef name="reload"  classname="org.apache.catalina.ant.ReloadTask"   />
<taskdef name="undeploy"  classname="org.apache.catalina.ant.UndeployTask" />

<property name="compile.debug"       value="true"  />
<property name="compile.deprecation" value="false" />
<property name="compile.optimize"    value="true"  />

<path id="compile.classpath">
    <fileset dir="${catalina.home}/common/endorsed">
    <include name="*.jar"/>
    </fileset>

    <fileset dir="${catalina.home}/common/lib">
    <include name="*.jar"/>
    </fileset>

    <fileset dir="${catalina.home}/shared/lib">
    <include name="*.jar"/>
    </fileset>

    <fileset dir="${basedir}/src/lib">
    <include name="*.jar"/>
    </fileset>
</path>

<target name="all" depends="clean,compile" />

<target name="list">
    <list url="${manager.url}" username="${manager.username}"
password="${manager.password}" />
</target>

<target name="clean">
    <delete dir="${build.home}"/>
    <delete dir="${dist.home}"/>
</target>

<target name="install" depends="compile">
    <deploy url="${manager.url}" username="${manager.username}"
password="${manager.password}" path="${app.path}"
localWar="file://${build.home}" />
</target>

<target name="reload" depends="prepare,compile">
    <reload url="${manager.url}" username="${manager.username}"
password="${manager.password}" path="${app.path}"/>
</target>

<target name="remove">
    <undeploy url="${manager.url}" username="${manager.username}"
password="${manager.password}" path="${app.path}"/>
</target>

<target name="dist" depends="compile">
    <mkdir dir="${dist.home}"/>
    <jar jarfile="${dist.home}/${app.name}.war" basedir="${build.home}"/>
</target>

<target name="compile" depends="prepare">
    <javac srcdir="${src.home}"
          destdir="${build.home}/WEB-INF/classes"
            debug="${compile.debug}"
      deprecation="${compile.deprecation}"
         optimize="${compile.optimize}">
        <classpath refid="compile.classpath"/>
    </javac>
</target>

<target name="prepare">
        
    <!-- Create build directories as needed -->
    <mkdir dir="${build.home}"/>
    <mkdir dir="${build.home}/META-INF"/>
    <mkdir dir="${build.home}/WEB-INF"/>
    <mkdir dir="${build.home}/WEB-INF/lib"/>
    <mkdir dir="${build.home}/WEB-INF/classes"/>

    <!-- Copy static content of this web application -->
    <copy todir="${build.home}">
        <fileset dir="${web.home}" />
    </copy>

    <!-- Copy precompiled jarfiles to dest -->
    <copy todir="${build.home}/WEB-INF/lib">
        <fileset dir="${lib.home}"/>
    </copy>

</target>

</project>

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to