Web Application Descriptors and Packaging

As stated in Chapter 2, web artifacts are packaged with several deployment descriptors into a web module called a WAR file. The WAR file is then packaged into an EAR. This section describes the structure of the web deployment descriptors and the structure of a WAR file.

Web Deployment Descriptors

The main deployment descriptor in a web module is the web.xml file. The web.xml file contains many settings. Code Snippet 6-5 shows the shell of web.xml. Much like the application.xml file in the EAR file, it contains the standard headers. The <web-app> tags are the parent tags of the web.xml file.

Code snippet 6-5. web.xml shell
 ?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, ...

Get IBM WebSphere: Deployment and Advanced Configuration 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.