Appendix B Packaging a Web Application

Throughout the book, you’ve packaged your application (JSPs, servlets, and other files) into a single file, called a WAR file (web archive). The WAR file serves two main purposes. First, it provides a convenient way to package all your files together, making it easy to copy an application from one machine to another. Second, it provides a configuration file that defines any configuration parameters for the Web application. In this appendix, you’ll spend a little more time becoming acquainted with WAR files and configuration files—in particular those items that are new with the 2.4 Servlet and 2.0 JavaServer Pages specifications.

A Simple WAR File Example

When you create a WAR file, you must include ...

Get Sams Teach Yourself JavaServer Pages™ 2.0 with Apache Tomcat in 24 Hours 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.