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.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access