Hitachi

uCosminexus Application Server System Design Guide


8.7.1 Separating the deployment of the static contents and the Web application

From the files that are used for responding to the requests from the client such as HTML file and image file, the contents that remain the same and do not change according to the contents of the request are called static contents. On the other hand, the contents that are dynamically generated according to the requests from the client, such as servlets and JSPs, are called dynamic contents.

The following section explains how to enhance the performance by separating and deploying the static contents and Web applications that are the dynamic contents.

Each example of setup is explained on the basis of an example of displaying an HTML page consisting of frames and inline images, as shown in the following figure, in the web browser:

Figure 8‒16: Example of HTML page consisting of static and dynamic contents

[Figure]

In the above configuration, the following files form the static contents that are not generated dynamically:

When embedding static content into a Web application, there is constant access between the Web server and the Web container even when transferring static content that does not need to be processed by the Web container. In the case of image files, the processing time takes longer due to the large data size.

Hitachi recommends that the static contents be segregated from the Web application and deployed on the Web server. This helps to reduce the frequency of network access and the size of exchanged data that in turn will enhance the performance. The following figure shows an image of the processing of the static contents and the Web application:

Figure 8‒17: Image of static contents and Web application processing

[Figure]

The method of deploying the static contents that have been segregated from the Web application is explained below using the HTML page configuration that is shown in Figure 8-16.

In case of Figure 8-16, the performance is enhanced by deploying the following static contents on the Web server:

Contents deployed on the Web server
  • Style sheet (such as a CSS file)

  • Inline image (image file)

  • HTML file that defines frames

The following figure shows an example of deployment:

Figure 8‒18: Deploying the static contents on the Web server (in the case of Web server integration)

[Figure]

Define the above mapping as shown below. For details, see the description of the ProxyPass directive in 6.2.6(15) in the uCosminexus Application Server HTTP Server User Guide.

Definition of reverse proxy
ProxyPass /APP/    http://myj2eeserver/APP/
Important note

During the Web server integration, instead of allocating all Web application files to the Web server, allocate only the static contents that are directly accessed from the client.

[Figure]

The reverse proxy might incorrectly identify a request for dynamic content as a request for static content if it cannot correctly read the extension or path information of the request. In this case, the reverse proxy sends the content on the Web server directly to the client without reassigning the request to processing in the J2EE server. If dynamic contents, such as servlets and JSPs, are allocated to a Web server, and if a request for dynamic contents is handled as a request for static contents, the source of the contents, such as the class file entities and JSPs, might be sent as a response to the request source client.