When you install the IDE, the installer automatically registers the bundled Tomcat Web Server with the IDE. You can also configure the IDE to deploy web applications to other installations of supported versions of the Tomcat Web Server. These versions need to be registered first. Unsupported versions of the Tomcat Web Server cannot be registered with the IDE. Instead, for these versions you can create Ant targets for starting and stopping the Tomcat Web Server and for the deployment of web applications, JSP pages, and servlets.
To write Ant targets to deploy to Tomcat Web Server 4:
c:/Program Files/Apache Group/Tomcat 4.1/webapps/MyWebAppProjectName
Make sure that the path above points to the Tomcat Web server's webapps folder, and replace MyWebAppProjectName with the name of your web application project.
<target name="startcat4" depends="init">
<exec executable="c:\Program Files\Apache Group\Tomcat 4.1\bin\startup.bat">
<env key="CATALINA_HOME" value="c:\Program Files\Apache Group\Tomcat 4.1"/>
<env key="CATALINA_BASE" value="c:\Program Files\Apache Group\Tomcat 4.1"/>
</exec>
</target> <target name="run" depends="compile">
<exec executable="C:\Program Files\mozilla.org\Mozilla\mozilla.exe">
<arg value="http://localhost:8080/MyWebAppProjectName/${client.urlPart}"/>
</exec>
</target> <target name="stopcat4" depends="init">
<exec executable="c:\Program Files\Apache Group\Tomcat 4.1\bin\shutdown.bat">
<env key="CATALINA_HOME" value="c:\Program Files\Apache Group\Tomcat 4.1"/>
<env key="CATALINA_BASE" value="c:\Program Files\Apache Group\Tomcat 4.1"/>
</exec>
</target>To integrate the Ant targets with the IDE:
To deploy the web application: