Now we will cover the installation of JBoss Weld into Java EE 6 and Servlet containers. All Java EE 6 containers will come with an implementation of CDI preinstalled, but there may be occasions in which we need to update the version of JBoss Weld that is installed within the container. As a Servlet container does not provide a CDI implementation, we will describe the process of installing JBoss Weld into popular Servlet containers.
For this chapter we will use the chapter3.war
, built from the code of this chapter, to activate JBoss Weld in each container as a way of visualizing the version that has been installed in a container. It's not necessary to use chapter3.war
, as we can use any WAR file that is CDI-enabled for our purposes.
To build chapter3.war
for a nonServlet container environment, simply run:
mvn clean package