War Packaging; Principles - Red Hat APPLICATION SERVER - JONAS Manual

Jonas
Hide thumbs Also See for APPLICATION SERVER - JONAS:
Table of Contents

Advertisement

This chapter is for the Web component provider; that is, the person in charge of developing the web
components on the server side. It describes how the web components should be packaged.

18.1. Principles

Web components are packaged for deployment in a standard Java programming language Archive file
called a
file (Web ARchive), which is a
war
A
has a specific hierarchical directory structure. The top-level directory of a
war
root of the application.
The document root is where JSP pages, client-side classes and archives, and static web resources are
stored. The document root contains a subdirectory called
and directories:
: The standard xml deployment descriptor in the format defined in the Java Servlet 2.4
web.xml
Specification. Refer to
jonas-web.xml
in
$JONAS_ROOT/xml/jonas-web_X_Y.xsd
: a directory that contains the servlet classes and utility classes.
classes
: a directory that contains JAR archives of libraries (tag libraries and any utility libraries called
lib
by server-side classes). If the Web application uses Enterprise Beans, it can also contain
This is necessary to give to the Web components the visibility of the EJB classes. However, if the
is intended to be packed in an
war
are directly included in the
the visibility of the EJB classes. Details about the class loader hierarchy are described in Chapter 5
JOnAS Class Loader Hierarchy.
18.1.1. Example
Before building a
war
the
WEB-INF/classes
Then, the
file (
war
web-application.war
cd your_webapp_directory
jar cvf web-application.war *
During the development process, an "unpacked version" of the
3.5.3 Configuring the WEB Container Service.
$JONAS_ROOT/xml/web-app_2_4.xsd
: The optional JOnAS-specific XML deployment descriptor in the format defined
EAR
. Due to the use of the class loader hierarchy, Web components have
EAR
file, the Java source files must be compiled to obtain the class files (located in
directory) and the two XML deployment descriptors must be written.
similar to the package used for Java class libraries.
jar
WEB-INF
.
, the
must not be placed here. In this case, they
ejb-jars
) is built using the
Chapter 18.

WAR Packaging

war
, which contains the following files
.
command:
jar
file can be used. Refer to Section
war
is the document
.
ejb-jars

Advertisement

Table of Contents
loading

This manual is also suitable for:

Application server

Table of Contents