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:
The vendor, name, and version for the specification that is implemented by the package (for example, Sun Microsystems JavaHelp 1.3)
The vendor, name, and version for the implementation of the specification.
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, EAServer 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 EAServer 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 EAServer Manager
Highlight the top-level Web Applications folder, or the Installed Web Applications folder in your application or server.
Choose File | View Installed Extensions
EAServer Manager displays the list of installed extensions. “EAServer Java extension properties” describes the fields.
Installing a new extension using EAServer Manager
Make sure the extension JAR file is accessible on the machine where you are running EAServer Manager
Follow the steps in “Viewing installed extensions in EAServer Manager” to display the Installed Extensions dialog box.
Click Add, then specify the full path to the extension JAR file.
EAServer Manager verifies that the extension’s manifest.mf file is formatted correctly, and if so, copies the extension JAR file to the EAServer extensions subdirectory.
You can define the extensions required by your Web applications in EAServer 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 EAServer Manager. When you export the Web application in WAR format, EAServer Manager includes the dependency information.
Defining required extensions in EAServer Manager
Display the Web Application properties dialog box.
Display the Extensions tab.
Click Add to create a new extension in the list, then edit the fields described in Table 21-2.
Table 21-2 describes the fields in EAServer Manager’s Installed Extensions dialog box and the corresponding entries in the manifest.mf file within an extension JAR file.
If you are creating Web applications outside of EAServer 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 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 21-2,
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 21-2. You may specify
additional entries not in Table 21-2, 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 © 2005. Sybase Inc. All rights reserved. |
![]() |