uCosminexus Application Server, Web Container Functionality Guide

[Contents][Glossary][Index][Back][Next]

2.21.2 Definition in the DD (Settings for each Web application)

Specify whether you want to use the static contents cache functionality, memory size of static contents permitting cache, and upper limit for the file size for each Web application.

This subsection describes the definitions in the DD required in the application development environment.

Specify the definition of static contents cache in each Web application in the <param-name> tag that exists in the <web-app><context-param> tag of web.xml.

The following table lists the definitions of the static contents cache in the DD:

Table 2-64 Definitions of the static contents cache in the DD

Items Parameters specified in <param-name> tag Set contents in <param-value> tag
Enabling or disabling the static contents cache functionality com.hitachi.software.web.static_content.cache.enabled Specifies the enabling or disabling of the static contents cache functionality.
Memory size in each Web application com.hitachi.software.web.static_content.cache.size Specifies the size that can be cached in the memory in bytes if the static contents cache functionality is enabled.
  • If the total size of the cache exceeds the specified value in the Web application, the Web application that has not been accessed for the longest time is deleted from the cache. The deletion of the cache is repeated until the total cache size becomes less than the set value.
  • In Web applications where the memory size is not specified, the value specified in its property is used. However, in Web applications where the memory size is specified, the value specified in its property is not used.
  • Specifies an integer value from 0 to 2147483647. If 0 is specified, restrictions are not set for the cacheable memory size for each Web application.
  • If an invalid value is set in this property and if the value is smaller than the value specified in the file size that permits cache, the default value is used.
  • If a null character string or blank character is set in this property, the default value is used.
File size permitting cache com.hitachi.software.web.static_content.cache.filesize.threshold Specifies the cacheable file size in bytes if the static contents cache functionality is enabled.
  • A file with size exceeding the specified value is not cached.
  • In Web applications where the file size is not specified, the value specified in its property is used. However, in Web applications where the file size is specified, the value specified in its property is not used.
  • Specifies an integer value from 0 to 2147483647. If 0 is specified, restrictions are not set for the cacheable file size.
  • If an invalid value is set in this property and if the value is greater than the value specified in the memory size for each Web application, the default value is used.
  • If a null character string or blank character is set in this property, the default value is used.
Note
The following parameters are used in the static contents cache functionality and therefore, cannot be used optionally in the <context-param> tag of the DD:
  • com.hitachi.software.web.static_content.cache.enabled
  • com.hitachi.software.web.static_content.cache.size
  • com.hitachi.software.web.static_content.cache.filesize.threshold

An example of the DD definition is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN' 'http: //java.sun.com/dtd/web-app_2_3.dtd'>
 
<web-app>
 <context-param>
 <param-name>
 com.hitachi.software.web.static_content.cache.enabled
 </param-name>-
 <param-value>true</param-value>
 </context-param>
 
 <context-param>
 <param-name>
 com.hitachi.software.web.static_content.cache.size
 </param-name>
 <param-value>5242880</param-value>
 </context-param>
 
 <context-param>
 <param-name>
 com.hitachi.software.web.static_content.cache.filesize.threshold
 </param-name>
 <param-value>102400</param-value>
 </context-param>
</web-app>

The above definition example defines the following contents: