Tomcat 4.1.x Tip - Contexts
Did you know that with Tomcat 4.1.x you can actually take an application's context out of the server.xml
file and put it in a contextName.xml
file in the $CATALINA_HOME/webapps
directory? This makes it much easier to install and configure your webapps. Using this feature, you can easily setup Tomcat for your webapp using an Ant task. Here's the one I'm using for AppFuse:
<target name="setup-tomcat" if="tomcat.home" description="copies mysql jdbc driver and application's context to tomcat"> <echo level="info"> Copying MySQL JDBC Driver to ${tomcat.home}/common/lib </echo> <copy todir="${tomcat.home}/common/lib"> <fileset dir="${hibernate.dir}/lib" includes="mm*.jar"/> </copy> <echo level="info"> Copying ${webapp.name}.xml to ${tomcat.home}/webapps </echo> <copy todir="${tomcat.home}/webapps"> <fileset dir="metadata/web" includes="${webapp.name}.xml"/> </copy> </target>
Posted by itdp on January 11, 2003 at 07:09 PM MST #