Skip Headers

Oracle Application Server Containers for J2EE Servlet Developer's Guide 10g (9.0.4) Part Number B10321-01 |
Home | Contents | Index

# 7
Configuration with Enterprise Manager

In an Oracle Application Server environment, configuration of Web modules is through Oracle Enterprise Manager. This chapter describes key features of Enterprise Manager for servlet and Web site configuration. It includes the following sections:

- Web Module Configuration in Oracle Enterprise Manager

- Application Server Control Page Descriptions

## Web Module Configuration in Oracle Enterprise Manager

The direct use of `global-web-application.xml`, `orion-web.xml`, and `default-web-site.xml` elements and attributes described in Chapter 6, "Configuration File Descriptions" is for development and deployment in an OC4J standalone environment. In an Oracle Application Server environment, such as for production deployment, use Enterprise Manager for Web module configuration and deployment.

Oracle Enterprise Manager Application Server Control is the administration console for an Oracle Application Server instance. It enables you to monitor real-time performance, manage Oracle Application Server components and instances, and configure these components and instances. This includes any instances of OC4J. In particular, Application Server Control includes pages to configure servlets and Web sites. Application Server Control comes with your Oracle Application Server installation. Log in as the `ias_admin` user.

The discussion in this chapter covers relevant Application Server Control pages for managing and configuring Web modules in an OC4J instance within Oracle Application Server. Some of the pages allow you to alter `global-web-application.xml`, `orion-web.xml`, and `default-web-site.xml` settings. Other pages display `web.xml` settings, which you can override through `orion-web.xml` settings.

Each page description notes the corresponding elements and attributes in `web.xml`, `orion-web.xml`/`global-web-application.xml`, or `default-web-site.xml`. The elements and attributes for `global-web-application.xml` or `orion-web.xml` are documented in "Element Descriptions for global-web-application.xml and orion-web.xml". The `default-web-site.xml` elements and attributes are covered in "Element Descriptions for Web Site XML Files". For information about `web.xml` elements, refer to the Sun Microsystems Java Servlet Specification.

See the Oracle Application Server Containers for J2EE User's Guide for additional information about using Enterprise Manager with OC4J. For general information about using Enterprise Manager to manage your Oracle Application Server environment, see the Oracle Application Server 10g Administrator's Guide.

## Application Server Control Page Descriptions

The following sections discuss key Application Server Control pages in Enterprise Manager for servlet and Web site configuration and deployment:

- Application Server Control OC4J Home Page

- Application Server Control OC4J Applications Page

- Application Server Control Deploy Application (EAR) Page

- Application Server Control Deploy Web Application (WAR) Page

- Application Server Control OC4J Administration Page

- Application Server Control Website Properties Page

- Application Server Control Web Module Page

- Application Server Control Web Module Properties Page

- Application Server Control Web Module Mappings Page

- Application Server Control Web Module Filtering and Chaining Page

- Application Server Control Web Module Environment Page

- Application Server Control Web Module Advanced Properties Page

### Application Server Control OC4J Home Page

The Oracle Application Server Instance Home Page is the main page you reach when you first access an Oracle Application Server instance through Application Server Control in Enterprise Manager. Through this page, you can drill down to any of the running OC4J instances by selecting the name of the instance (`home`, for example) in the System Components table. Application Server Control will then display the OC4J Home Page for that instance.

Figure 7-1 shows portions of the OC4J Home Page for the `home` instance.

#### Figure 7-1 Application Server Control OC4J Home Page

Text description of the illustration oemoc4j.gif

From the OC4J Home Page, you can do the following:

- Click Applications to access the Application Server Control OC4J Applications Page.

- Click Administration to access the Application Server Control OC4J Administration Page.

### Application Server Control OC4J Applications Page

Figure 7-2 shows the OC4J Applications Page, which enables you to deploy applications. You can reach this page by clicking Applications from the OC4J Home Page.

In particular, relating to topics covered in this manual, note the following:

- Clicking the Deploy EAR file button provides access to the Deploy Application Page.

- Clicking the Deploy WAR file button provides access to the Deploy Web Application Page.

#### Figure 7-2 Application Server Control OC4J Applications Page

Text description of the illustration oemapps.gif

### Application Server Control Deploy Application (EAR) Page

Figure 7-3 shows the key portion of the Application Server Control Deploy Application Page, which is the page for deploying an EAR file. Drill down to this page from the Applications Page of an OC4J instance by clicking the Deploy EAR file button.

#### Figure 7-3 Application Server Control Deploy Application Page

Text description of the illustration oemdepea.gif

In the Deploy Application Page, click the Browse button to select an EAR file to deploy, then specify the desired J2EE application name, which is typically the same as the EAR file name without the `.ear` extension. You can also specify a parent application, but it is typical to use the OC4J default application as the parent.

Deployment results in a new `<application>` element being entered in the `server.xml` file.

When you click the Continue button, you will come to the Deploy Application: URL Mapping for Web Modules Page, which enables you to set a URL context path for the Web application that the J2EE application contains. Figure 7-4 shows this page, with the default context path for the Web application of a J2EE application named `utility`. Clicking the Next button enables you to review your entries and then deploy.

Specifying a URL context path results in an entry in the `default-web-site.xml` file to bind the Web application to the Web site. This is accomplished through a new `<web-app>` subelement of the `<web-site>` element. In addition, the `mod_oc4j.conf` configuration file for the Oracle HTTP Server `mod_oc4j` Apache mod is updated with appropriate mount points.

Note: In specifying the context path, the following forms are treated equivalently:
    someUrl
    /someUrl
    /someUrl/

#### Figure 7-4 Application Server Control Deploy Application: URL Mapping Page

Text description of the illustration oemdepe2.gif

### Application Server Control Deploy Web Application (WAR) Page

Figure 7-5 shows the key portion of the Application Server Control Deploy Web Application Page, which is the page for deploying an independent WAR file. Drill down to this page from the Applications Page of an OC4J instance by clicking the Deploy WAR file button.

Note: When you deploy an independent WAR file, it is wrapped in an EAR file transparently.

#### Figure 7-5 Application Server Control Deploy Web Application Page

Text description of the illustration oemdepwa.gif

In the Deploy Web Application Page, click the Browse button to select a WAR file to deploy. Then specify a desired J2EE application name along with a URL context path to map to the Web application. Transparently, a J2EE application by the specified application name will be created to contain the Web application. In OC4J, any Web application must be contained in a J2EE application.

As with an EAR file, the deployment results in a new `<application>` element in the `server.xml` file, and in an entry in the `default-web-site.xml` file to bind the Web application to the Web site. The Web application binding is accomplished through a new `<web-app>` subelement of the `<web-site>` element. In addition, the `mod_oc4j.conf` configuration file for the Oracle HTTP Server `mod_oc4j` Apache mod is updated with appropriate mount points.

Note: In specifying the context path, the following forms are treated equivalently:
    someUrl
    /someUrl
    /someUrl/

### Application Server Control OC4J Administration Page

Figure 7-6 shows the OC4J Administration Page, which enables you to access OC4J instance properties. You can reach this page by clicking Administration from the OC4J Home Page.

Clicking Website Properties under Instance Properties provides access to the Website Properties Page, through which you can access a variety of pages to update Web module properties.

#### Figure 7-6 Application Server Control OC4J Administration Page

Text description of the illustration oemadmin.gif

### Application Server Control Website Properties Page

Figure 7-7 shows the key portion of the Application Server Control Website Properties Page for an OC4J instance. Drill down to this page by clicking Website Properties under Instance Properties in the OC4J Administration Page.

#### Figure 7-7 Application Server Control Website Properties Page

Text description of the illustration oemwebpr.gif

Among other things, this page enables you to specify whether each application should be loaded automatically when OC4J starts. (Otherwise, an application is not loaded until the first request for it.) This corresponds to the `load-on-startup` attribute of the appropriate `<web-app>` subelement of the `<web-site>` element in the `default-web-site.xml` file. (For general information about loading an application at OC4J startup, see "Servlet Preloading".)

From the Website Properties Page, drill down to the Web Module Page for any particular Web module. In the sample page above, for example, you can click `webapp` to drill down to the Web Module Page for that module.

### Application Server Control Web Module Page

Figure 7-8 shows the key portion of the Application Server Control Web Module Page for the module `webapp`. Drill down to the Web Module Page for a particular module by clicking the module name in the Website Properties Page.

#### Figure 7-8 Application Server Control Web Module Page

Text description of the illustration oemwebmo.gif

From the Web Module Page, you can access several categories of Web module properties through the following links under Properties in the Administration section of the page:

- General to drill down to the Web Module Properties Page

- Mappings to drill down to the Web Module Mappings Page

- Filtering and Chaining to drill down to the Web Module Filtering and Chaining Page

- Environment to drill down to the Web Module Environment Page

- Advanced Properties to drill down to the Web Module Advanced Properties Page

### Application Server Control Web Module Properties Page

Figure 7-9 and Figure 7-10 show portions of the Application Server Control Web Module Properties Page for a particular module. Drill down to this page by clicking General under Properties in the Administration section of the Web Module Page.

#### Figure 7-9 Application Server Control Web Module Properties Page (1 of 2)

Text description of the illustration oemgenl1.gif

#### Figure 7-10 Application Server Control Web Module Properties Page (2 of 2)

Text description of the illustration oemgenl2.gif

Correspondence of these settings to `orion-web.xml` elements is as follows.

In the General section:

- Servlet Directory corresponds to the `servlet-webdir` attribute of the `<orion-web-app>` element.

- Temporary Directory corresponds to the `temporary-directory` attribute of the `<orion-web-app>` element.

- Response Buffer Size corresponds to the `default-buffer-size` attribute of the `<orion-web-app>` element.

- File Check Interval corresponds to the `file-modification-check-interval` attribute of the `<orion-web-app>` element.

In the Session Configuration section:

- Use Cookies corresponds to the `cookies` attribute of the `<session-tracking>` element, which is a subelement of the `<orion-web-app>` element.

- Session Auto Join corresponds to the `autojoin-session` attribute of the `<session-tracking>` element.

- Session Timeout corresponds to the `<session-timeout>` subelement of the `<session-config>` subelement of the standard `<web-app>` element. You can use a `<web-app>` subelement under `<orion-web-app>` in `orion-web.xml` for deployment-specific overrides of `<web-app>` settings in the application `web.xml` file.

- Cookie Max Age corresponds to the `cookie-max-age` attribute of the `<session-tracking>` element.

- Cookie Domain corresponds to the `cookie-domain` attribute of the `<session-tracking>` element.

- Session Storage Directory corresponds to the `persistence-path` attribute of the `<orion-web-app>` element.

In the Class Paths section:

- Adding a classpath here corresponds to setting the `path` attribute of a `<classpath>` subelement of the `<orion-web-app>` element.

In the Session Trackers section:

- Adding a session tracker here corresponds to setting the `servlet-name` attribute of a `<session-tracker>` element, which is a subelement of the `<session-tracking>` element.

In the Virtual Directories section:

- Adding a virtual directory here corresponds to setting the `real-path` and `virtual-path` attributes of a `<virtual-directory>` subelement of the `<orion-web-app>` element.

In the Tag Libraries section:

- This lists JSP tag libraries that are used in the application, according to contents of the WAR file.

### Application Server Control Web Module Mappings Page

Figure 7-11 and Figure 7-12 show portions of the Application Server Control Web Module Mappings Page for a particular module. Drill down to this page by clicking Mappings under Properties in the Administration section of the Web Module Page.

#### Figure 7-11 Application Server Control Web Module Mappings Page (1 of 2)

Text description of the illustration oemmaps1.gif

#### Figure 7-12 Application Server Control Web Module Mappings Page (2 of 2)

Text description of the illustration oemmaps2.gif

The following settings all correspond to subelements of the `<web-app>` element in the `web.xml` file. You can use a `<web-app>` subelement under `<orion-web-app>` in `orion-web.xml` for deployment-specific overrides of these settings. You can use the Advanced Properties Page for this purpose--see "Application Server Control Web Module Advanced Properties Page".

In the Servlet Mappings section:

- A servlet name and URL pattern specified here correspond to settings in the `<servlet-name>` and `<url-pattern>` subelements of a `<servlet-mapping>` subelement of the `<web-app>` element.

In the MIME Mappings section:

- A MIME type and extension specified here correspond to settings in the `<mime-type>` and `<extension>` subelements of a `<mime-mapping>` subelement of the `<web-app>` element.

In the Welcome Files section:

- A file name specified here corresponds to the setting in a `<welcome-file>` subelement of the `<welcome-file-list>` subelement of the `<web-app>` element.

In the Error Pages section:

- An error code and location specified here correspond to settings in the `<error-code>` and `<location>` subelements of an `<error-page>` subelement of the `<web-app>` element.

- An exception class and location specified here correspond to settings in the `<exception-type>` and `<location>` subelements of an `<error-page>` subelement of the `<web-app>` element.

### Application Server Control Web Module Filtering and Chaining Page

Figure 7-13 shows the key portion of the Application Server Control Web Module Filtering and Chaining Page for a particular module. Drill down to this page by clicking Filtering and Chaining under Properties in the Administration section of the Web Module Page.

#### Figure 7-13 Application Server Control Web Module Filtering and Chaining Page

Text description of the illustration oemfilt.gif

Correspondence of these settings to `orion-web.xml` elements is as follows.

In the Servlet Filtering section:

- Adding a filter here is equivalent to setting the `servlet-name` and `url-pattern` attributes of a `<servlet-filter>` subelement of the `<orion-web-app>` element. The servlet name you specify is tied to a servlet class through its standard configuration in the `web.xml` file.

In the Servlet Chaining section:

- Adding a chain here is equivalent to setting the `servlet-name` and `mime-type` attributes of a `<servlet-chaining>` subelement of the `<orion-web-app>` element. The servlet name you specify is tied to a servlet class through its standard configuration in the `web.xml` file.

Note: Servlet chaining is an older mechanism with essentially the same functionality as standard servlet filtering, which was introduced in the servlet 2.3 specification. It is advisable to use servlet filtering instead. See "Servlet Filters".

### Application Server Control Web Module Environment Page

Figure 7-14 shows the key portion of the Application Server Control Web Module Environment Page for a particular module. Drill down to this page by clicking Environment under Properties in the Administration section of the Web Module Page.

#### Figure 7-14 Application Server Control Web Module Environment Page

Text description of the illustration oemenv.gif

This page shows settings for servlet context parameter overrides, environment entry overrides, and resource references. The overrides indicate settings in the `orion-web.xml` file that override corresponding `web.xml` settings.

Correspondence of these settings to `web.xml` and `orion-web.xml` elements is as follows.

In the Servlet Context Parameters section:

- This section displays settings of `web.xml` `<context-param>` elements that can be overridden for this deployment, along with any Deployed Value overrides that have already been specified. Enter a new value in the Deployed Value column to specify a new override. Doing so creates a `<context-param-mapping>` entry in `orion-web.xml`.

In the Environment Entries section:

- This section displays settings of `web.xml` `<env-entry>` elements that can be overridden for this deployment, along with any Deployed Value overrides that have already been specified. Enter a new value in the Deployed Value column to specify a new override. Doing so creates an `<env-entry-mapping>` entry in `orion-web.xml`.

In the Resource References section:

- This section displays a combination of `web.xml` and `orion-web.xml` settings. The name and type of a resource reference correspond to `<res-ref-name>` and `<res-type>` subelements under a `<resource-ref>` subelement of the `<web-app>` element in the `web.xml` file. The JNDI location and lookup context correspond to settings under a `<resource-ref-mapping>` element and its `<lookup-context>` subelement, under the `<orion-web-app>` element in the `orion-web.xml` file.

### Application Server Control Web Module Advanced Properties Page

Figure 7-15 shows the key portion of the Application Server Control Web Module Advanced Properties Page for a particular module. Drill down to this page by clicking Advanced Properties under Properties in the Administration section of the Web Module Page.

You can use the Web Module Advanced Properties Page to edit `orion-web.xml` or `global-web-application.xml` for any settings not covered by the previously discussed Application Server Control Web module pages. In fact, you can make any `orion-web.xml` or `global-web-application.xml` entries through the Advanced Properties Page; however, it is advisable to use the previously described pages whenever possible because of their error handling and reporting features.

#### Figure 7-15 Application Server Control Web Module Advanced Properties Page

Text description of the illustration oemadv.gif

| Copyright © 2002, 2003 Oracle Corporation. All Rights Reserved. |
Home | Contents | Index