Hitachi

uCosminexus Application Server Compatibility Guide


6.7.3 Execution environment settings (J2EE server settings)

This section describes the settings for distributing requests with the redirector.

Organization of this subsection

(1) Overview

In the in-process HTTP server, you can distribute requests by the URL pattern included in the HTTP request. You can also customize the response for the distributed request and return a specific file to the client. When the response status code for the request to a redirected URL is 300, the response body is auto-generated and the response is returned to the client. Also, you can use a specified file as a response body. When you specify the file, also specify the Content-Type header of the response.

The auto-generated response body is as follows:

<HTML><HEAD>
<TITLE>Status code and explanation</TITLE>
</HEAD><BODY>
<H1>Status code and explanation</H1>
</BODY></HTML>

The status code for which the response body is auto-generated and the description is as follows:

When the reading of the file used as the response body during request processing fails, if 300 is specified as the status code, the response body is auto-generated and returned to the client. If 200 is specified as the status code, status 500 error is returned to the client.

(2) How to set

Specify the definition for distributing requests with the redirector in the <configuration> tag of the logical J2EE server (j2ee-server), in the Easy Setup definition file.

The following table lists the definitions in the Easy Setup definition file for distributing requests with the redirector:

Table 6‒11: Definitions in the Easy Setup definition file for distributing requests with the redirector

Parameter to be specified

Setting contents

webserver.connector.inprocess_http.redirect.list

Specifies the redirect definition name.

webserver.connector.inprocess_http.redirect.redirect-difinition-name.request_url

Specifies the URL of the redirected request as an absolute path beginning with a forward slash (/).

webserver.connector.inprocess_http.redirect.redirect-difinition-name.redirect_url

Specifies the URL for redirecting the request. Note that when 200 is specified as the status code, the URL cannot be specified.

webserver.connector.inprocess_http.redirect.redirect-difinition-name.status

Specifies the response status code used when redirection is executed.

webserver.connector.inprocess_http.redirect.redirect-difinition-name.file

Specifies the file to be used as the response body when a specific file is returned to the client as a response. Note that when 200 is specified as the status code, the file to be used must be specified.

webserver.connector.inprocess_http.redirect.redirect-difinition-name.file.content_type

Specifies the Content-Type header of the file to be used as the response body when a specific file is returned as a response to the client.

For details on the Easy Setup definition file and parameters to specify, see Part 3 Reference (V9 Compatibility Mode).

Important note
  • When the HTTP response is an HTML file, if another file (such as an image file) is being referenced from that HTML, the file might not be properly displayed in the browser.

  • If the value specified in the redirect URL matches with the value specified for the request URL, note that the client keeps redirecting the requests.

  • When a session is managed by URL rewriting, the session cannot be inherited even if the request is redirected to the same Web application as the request URL.

(3) Example settings

An example of settings for request distribution with the redirector is as follows: