Saturday January 11, 2003
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 in Java at Jan 11 2003, 08:01:51 AM MST 1 Comment
Matt Raible is the Lead UI Architect at LinkedIn. The opinions on this site are mine, not my employers.
Search This Site
Recent Entries
- Jack's Mohawk
- LinkedIn Cuts 10% (a.k.a. The Journey is Over)
- Happy Birthday Abbie!
- Moving from Spring's XML to Annotations in AppFuse
- Free Maven Training in New Orleans on Election Day
- AppFuse Light ยป AppFuse, Maven Archetypes and Shared Web Assets
- Great Weekend in Montana
- Colorado Software Summit 2008 Wrapup
- RESTful Web Applications with Subbu Allamaraju
- Core Animation with Bill Dudney
Posted by itdp on January 11, 2003 at 12:09 PM MST #