Chapter 19 Creating Web Applications
In Java, an extension is a formally described set of related classes that extends the functionality offered by the base Java platform or by a J2EE application server. Extensions are packaged as Java JAR files, and include additional information in the JAR file's manifest.mf file to describe the extensions characteristics, such as:
For more information on Java extensions, see the the Java documentation .
In accord with the Servlet 2.3 specification, EAServer allows you to install extensions and define the extensions required by a Web application. If you import a Web application (in WAR format) that requires extensions that are not installed, Jaguar Manager warns you of the unfulfilled dependencies.
In your EAServer installation, installed Java extensions are stored in the extensions subdirectory. All Web applications in one EAServer installation have access to the same set of installed Java extensions. In Jaguar Manager, you can manage Java extensions from the top-level Web Applications or from the Installed Web Applications folders for any application or server.
Viewing installed extensions
in Jaguar Manager
Installing a new extension using Jaguar Manager
You can define the extensions required by your Web applications in Jaguar Manager or in the manifest.mf file bundled within a Web application archive (WAR) file. Doing so increases the portability of the Web application among J2EE servers from different vendors. When a server imports a WAR file that specifies required extensions, it checks that the required extensions are available.
Follow this procedure if you are defining or modifying a Web application in Jaguar Manager. When you export the Web application in WAR format, Jaguar Manager includes the dependency information.
Defining required extensions in Jaguar Manager
Table 19-1 describes the fields in Jaguar Manager's Installed Extensions dialog box and the corresponding entries in the manifest.mf file within an extension JAR file.
Jaguar Manager field | Manifest entry | Description |
---|---|---|
Extension Name | Extension-Name
|
The extension name. |
Specification Version | Specification-Version
|
The version number of the specification that the extension conforms to. |
Specification Vendor | Specification-Vendor
|
The company or organization responsible for the specification that the extension conforms to. |
Implementation Version | Implementation-Version
|
The implementation version number. |
Implementation Vendor | Implementation-Vendor
|
The company or organization responsible for the implementation. |
Implementation Vendor ID | Implementation-Vendor-ID
|
A unique identifier for the company or organization responsible for the implementation. Usually follows the reverse-domain naming convention used in Java packages, for example, "com.sybase." |
Implementation URL | Implementation-URL
|
A Web URL to obtain information on the implementation. |
If you are creating Web applications outside of Jaguar Manager, you must specify required Java extensions by adding entries to the manifest file within the WAR (path META-INF/MANIFEST.mf). If you are using a Java development tool such as PowerJ that supports the Servlet 2.3 specification, your tool most likely provides graphical support for specifying dependencies. See your tool's documentation for details.
The Extension-List
manifest
entry lists the names of required extensions. This entry has the
form:
Extension-List: ext1 ext2 ext3 ...
Where ext1, ext2, ext3,
and so forth are the names of the required extensions. For each
name, you must specify additional entries from the Manifest entry column
of Table 19-1,
prefixed with the name and a hyphen. For example, if the name is
javahelp, you must specify a javahelp-Extension-Name
entry
as well as the other manifest entries from Table 19-1. You may specify
additional entries not in Table 19-1, but these are ignored by EAServer.
The following example shows a section of a WAR manifest that
requires two extensions, javahelp
and java3d
:
Extension-List: javahelp java3d javahelp-Extension-Name: javax.help javahelp-Specification-Version: 1.0 javahelp-Implementation-Version: 1.0.3 javahelp-Implementation-Vendor-Id: com.sun java3d-Extension-Name: javax.3d java3d-Specification-Version: 1.0 java3d-Implementation-Version: 1.2.1 java3d-Implementation-Vendor-Id: com.sun
Copyright © 2002 Sybase, Inc. All rights reserved. |
![]() |