Tomcat doesn't use the build.xml
and the build.properties
files, these are for Ant which is a tool to automate the build of the application. The script shown in this tutorial is pretty basic, it defines 2 targets to compile sources and to clean compiled classes. And you would use them like this:
ant build
or
ant clean
The appserver.lib
property is used to build the class path required to compile sources. It is derived from the root of your Tomcat installation directory and is used to find the JAR for the Servlet API that you need to compile sources. If you decide to use this Ant script, you should update the appserver.home
property to match your install. For example:
appserver.home=c:/apps/tomcat5.5
appserver.lib=${appserver.home}/common/lib
But to be honest, the whole setup is a bit messy (it's straightforward, but messy):
- you shouldn't bundle the
servlet-api.jar
in WEB-INF/lib
as suggested
- I don't like to develop directly under Tomcat's
webapp
directory (but this is maybe subjective).