DefinitionDeployables are archives (WAR, EAR, etc) that can be deployed in the container
Deployable class is a wrapper class around a physical archive.
Deployable are constructed by directly instantiating them (e.g.
new WAR(...) or
new TomcatWAR(...)) or by using a
DefaultDeployableFactory). There are 2 generic deployable classes:
There are also some container-specific deployables such as:
They are there to support container extensions to archives (for example, Tomcat supports
context.xmlfiles located in your WAR's
META-INFdirectory, JBoss allows for a
jboss-web.xmllocated in your WAR, etc).
DeployableFactory interface offers a principal method for creating a
DeployableFactory.createDeployable(String containerId, String deployableLocation, DeployableType type).
DeployableType can be
Example using the Java API
Deploying a WAR in Tomcat 5.x:
Example using the Generic API
Example using the Ant API
Statically deploying a WAR in Tomcat 5.x: