Sun Java System Access Manager 7.1 Developer's Guide

WAR Files in J2EE Software Development

Access Manager is built upon the Java 2 Platform, Enterprise Edition (J2EE) platform which uses a component model to create full-scale applications. A component is self-contained functional software code assembled with other components into a J2EE application. The J2EE application components can be deployed separately on different servers. J2EE application components include the following:

Web Components

When a web browser executes a J2EE application, it deploys server-side objects known as web components. Java Server Pages (JSPs) and corresponding servlets are two such web components.

Servlets

Small Java programs that dynamically process requests and construct responses from a web browser. Servlets run within web containers.

Java Server Pages (JSPs)

Text-based documents that contain static template data such as HTML, Scalable Vector Graphics (SVG), Wireless Markup Language (WML), or eXtensible Markup Language (XML). JSPs also contain elements such as servlets that construct dynamic content.

How Web Components are Packaged

J2EE components are usually packaged separately, and then bundled together into an Enterprise Archive (EAR) file for application deployment. Web components are packaged in web application archives, also known as WAR files. Each WAR file contains servlets, JSPs, a deployment descriptor, and related resource files.

Static HTML files and JSP are stored at the top level of the WAR directory. The top-level directory contains the WEB-INF subdirectory which contains tag library descriptor files in addition to the following:

Server-side classes

Servlets, JavaBean components and related Java class files. These must be stored in the WEB-INF/classes directory.

Auxiliary JARs

Tag libraries and any utility libraries called by server-side classes. These must be stored in the WEB-INF/lib directory.

web.xml

The web component deployment descriptor is stored in the WEB-INF directory