The web.xml File

As we explained in chapter 27 on servlets, the web.xml file is used to provide various configuration parameters for the Web application, or application components, which reside in that context. In the case of our application, we use two queries to drive the creation of the movies list pages. The carts-totals-query is defined as a context-param, meaning it is part of the context and is available to all Web components in that context.

A number of other entries in the web.xml file are for configuring Struts. These entries allow debug levels to be set and other parameters to be configured by the developer or deployer.

The web.xml File
 <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD ...

Get J2EE™ and Beyond: Design, Develop, and Deploy World-Class Java™ Software 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.