Chapter 8: Web Application Administration The compile target

Chapter 8: Web Application Administration The compile target in build.xml compiles all the Java code and puts the class files into the appropriate location (such as the /WEB-INF/classes directory). It then builds the deployable JAR file. Developers may need to fix compilation errors, if any, and then rerun the Ant command. In our simple Web application, this task does nothing as there are no Java files to compile. The deploy target can then be used to deploy the Web application in the Tomcat instance specified in the Ant build file: $ ant deploy This installed application can then be tested, and errors ironed out. During each iteration, developers would (re)compile, undeploy the previous installation, and then (re)deploy the new Web application. In addition to these tasks, all other actions that can be executed from the Web UI to the manager, such as viewing resources, roles, server information, and so on, can be performed via the Ant script, too: In addition, there are JMX tasks that allow for querying, viewing, and modifying Tomcat s behavior at runtime. In the example of this that follows, the jmxget target shows the value of the maximum active sessions attribute for the hello Web application, and the jmxget target sets this property to 100. The jmxquery target shows all servlets loaded by the Tomcat container.

For reliable and cheap web hosting services please check cheap web hosting website.

Comments are closed.