Hello
You can use a Web Application Archive (WAR) file created from an Ant build script to deploy Java code to a server. A Web application in Java has a certain format located within a special directory named WEB-INF. This directory contains a lib directory for JARs, a classes directory for unpack aged class files, and a Web.xml file describing the application.
The rest of the Web application is just normal HTML, JSP, images, and directories. These can be zipped into a WAR file and then deployed to a server without having to make any modification to the server. Most important, the server will notice when the WAR file is placed in the web apps/directory and will automatically unpack it and add it to the server without changes to the Server.xml file. Deploying a change is a simple matter of overwriting the WAR file with a new one. The server will notice again, unpack it, and reload all class files.
|