Hot-Deploying a Web Application to JBoss
Problem
You want to use JBoss to hot-deploy a web application WAR file.
Solution
Copy a new WAR to the deploy
directory within
the server environment that JBoss was started with. Of course, you
also need to ensure that JBoss is configured with a servlet
container.
Discussion
A lot of developers use JBoss with a compliant servlet container,
such as Tomcat, to receive the benefits of automatic hot-deploying.
JBoss is intelligent enough to scan the deploy
directory for WAR files, too, and deploy them to the servlet
container. This ability removes the need for managing a complex Ant
buildfile that we saw earlier in this chapter.
Tip
JBoss is not a servlet container. JBoss can embed a servlet container, though. For example, you can configure JBoss to use Tomcat.
Recipe 10.9 shows how to deploy an EAR file to JBoss. The same techniques apply for WAR files, too.
See Also
Recipe 10.9 shows how set up your Ant buildfile for deploying applications to JBoss.
Get Java Extreme Programming Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.