Understanding deployment structures
There are different ways to package and deploy an application, and each one has a specific set of benefits and challenges. When using Eclipse to publish projects, as we have been doing here, the archived file model is the only format that can't be used by the IDE—we can choose either from the exploded archive directory or the split development directory (also known as a virtual application).
Let's check each available option and when they can be used.
Packaging as an archived file
This is the most common way of packaging one or more projects—just create a JAR, WAR, or EAR file with all application resources and compiled code inside, and deploy it to the server. From Eclipse, we can create a deployment unit by using the Export… context menu of a project.
Using an exploded archive directory
This option is pretty close to the archived file one—the structure is basically the same, but instead of using a single packaged file, we use a folder with the same contents...