Web container custom properties


 

+

Search Tips   |   Advanced Search

 

To specify Web container custom properties:

  1. In the admin console click...

    Servers | Server Types | WebSphere application servers | server_name | Web Container Settings | Web container | Additional Properties | Custom Properties | New

  2. On the settings page, enter the name of the custom property to configure in the Name field and the value to set it to in the Value field.

  3. Click Apply or OK.

  4. Click Save on the console task bar to save the configuration changes.

  5. Restart the server.

The following is a list of custom properties provided with the appserver. See also, custom properties for JSP specific Web containers and HTTP transports .

com.ibm.ws.webcontainer.disallowAllFileServing

Disable file serving on all applications on a specific appserver.

We can enable file serving on a global level across a given appserver by using the fileServingEnabled custom property. However, the fileServingEnabled property is overridden by the specific deployment information of each application.

The current fileServingEnabled custom property only applies as a backup in case an application does not define the fileServingEnabled setting itself. To globally override this setting on a specific appserver to prevent the appserver from serving static files regardless of their individual deployment settings, set...

Name Value
com.ibm.ws.webcontainer.disallowAllFileServing true

Disallow the use of the serving servlets by class name

When the serveServletsByClassnameEnabled property is enabled, it is possible to access servlets directly, resulting in a possible security exposure. Define the following custom property to disallow the use of the serveServletsByClassnameEnabled property across the entire appserver level.

Name Value
com.ibm.ws.webcontainer.disallowserveservletsbyclassname true

Define classes that cannot be served by class name

The custom property...

com.ibm.ws.webcontainer.donotservebyclassname

...specifies a list of classes that cannot be served by the class name.

Name Value
com.ibm.ws.webcontainer.donotservebyclassname A semi-colon delimited list of classes to be completely disallowed from being served by class name.

Writing chunks of data using synchronous writes

By default, the Web container uses asynchronous writes to write response data in chunks up to the response buffer size. For larger responses that are greater than the response buffer size, the Web container continues to buffer response data into memory while waiting for an asynchronous write of a response data chunk to complete. This can result in part of a large response held in memory, which can lead to high memory usage and potentially an out of memory error. An appserver hang may also occur when a server is simultaneously processing more requests than Web container defined threads.

If com.ibm.ws.webcontainer.channelwritetype is set to sync, synchronous writing is used. Default is asynchronous.

With synchronous writing, response data are written synchronously in chunks of up to the value of responsebuffersize and no response data are buffered into memory while waiting for a synchronous write of a response data chunk to complete.

As a result, the approximate maximum amount of response data that is held in memory is equal to the responsebuffersize multiplied by the number of Web container threads. The maximum number of requests that can be processed simultaneously by the Web container is limited by the number of Web container threads. Additional requests are queued, waiting for a request that is in process to complete.

The responsebuffersize Web container custom property defines the maximum amount of response data written by the Web container in a single chunk, and is 32k by default. As a result, it is used to change the number of writes needed by the Web container to send complete response data. However, if an application flushes response data, any response data held by the Web container is immediately written irrespective of the responsebuffersize.

Use the following name-value pair to write chunks of data using synchronous writes.

Name Value
com.ibm.ws.webcontainer.channelwritetype sync

Recognizing filter mappings to "*" as a mapping to "/*"

When processing a request, the Web container recognizes servlet mappings to "*" as the same as servlet mappings to "/*". To provide the same behavior with filter mapping, set the com.ibm.ws.webcontainer.mapFiltersToAsterisk custom property to true. Setting the com.ibm.ws.webcontainer.mapFiltersToAsterisk custom property to true causes the Web container to recognize filter mappings to "*" as a filter mapping to "/*" . This custom property is not case sensitive.

Name Value
com.ibm.ws.webcontainer.mapFiltersToAsterisk true

Suppressing the HTML output of error text

During a recursive error that an application specified error page cannot handle, the stack trace and error message are outputted as an HTML page. This information includes class names and program information that the application developer does not want expose to the user.

We can set the com.ibm.ws.webcontainer.suppressHtmlRecursiveErrorOutput Web container custom property to suppress the HTML output of the error text, without changing the internal logging of the message. Set the custom property com.ibm.ws. webcontainer.suppressHtmlRecursiveErrorOutput to true to disable the HTML output of the error message to the user and present the user with blank page with a 500 error code.

Name Value
com.ibm.ws.webcontainer.suppressHtmlRecursiveErrorOutput true

DebugSessionCrossover

The custom property...

DebugSessionCrossover

...enables code to perform additional checks to verify that only the session associated with the request is accessed or referenced. Messages are logged if any discrepancies are detected.

The use of the DebugSessionCrossover property as a Web container custom property is deprecated. We can now define it as a session management custom property.

To enable session data crossover detection, use the following name-value pair:

Name Value
DebugSessionCrossover true

See article, HTTP session problems, for additional information.

DecodeUrlAsUTF8

The UTF-8 encoded URL feature, which provides UTF-8 encoded Uniform Resource Locators (URLs) to support the double-byte characters in URLs is enabled by default. We can prevent the Web container from explicitly decoding URLs in UTF-8 and have them use the ISO-8859 standard as per the current HTTP spec by using the following name-value pair.

Name Value
DecodeUrlAsUTF8 false

enableInProcessConnections

Use the enableInProcessConnections custom property to reduce response times and to reduce the number of threads that are used to service a request, which reduces the potential for a deadlock. There is an optimized communication path between a Web services client application and a Web container that are located in the same appserver process. Requests from the Web services client that are normally sent to the Web container using a network connection are delivered directly to the Web container using an optimized local path. The local path is available because the Web services client application and the Web container are running in the same process. This optimized communication path is disabled by default. Before enabling this property, make sure that wild cards are not specified for the Web container ports. Use specific ports for the Web container when the optimized communication path is enabled. To enable the optimized communication path, use the following name-value pair:

Name Value
enableInProcessConnections true

See article, Web services client to Web container optimized communication, for additional information.

fileServingEnabled

fileServingEnabled, directoryBrowsingEnabled, and similar properties are global settings for internal servlets. WAR files that are packaged using third-party tools cannot specify behavior for the services that are exposed by the Web container internal servlets. We can globally enable and disable internal servlets for all Web apps at the Web container level by creating name-value pairs.

Name Value
fileServingEnabled true
directoryBrowsingEnabled true
serveServletsByClassnameEnabled true

Settings defined in an assembly tool take precedence over the global settings that are set through the custom properties at the Web container level.

Web app deployment extensions continue to hold configuration information for the services that are provided by the internal servlets, and take precedence over the global settings that are set through the custom properties at the Web container level.

Improving the startup time for large applications

The custom property...

com.ibm.wsspi.jsp.disableTldSearch custom property can be used to improve application startup time. By default, when an application starts, the JSP engine searches the application installation directories for the taglib descriptor (TLD) files. This search process might increase the startup time for large applications with a large number of files and directories. To disable this search process, use the following name-value pair:

Name Value
com.ibm.wsspi.jsp.disableTldSearch true

Invalidating sessions after specified time has elapsed

The custom property...

ForceSessionInvalidationMultiple custom property indicates whether the session manager should wait indefinitely for a request to complete before attempting to invalidate the session, or attempt to invalidate a session after the specified time limit has elapsed. The default value for this property is 1.

  • If we specify 0 (zero) for this custom property, the session manager waits indefinitely until a request is complete before attempting to invalidate the session.

    If the requests normally are not bound by a response time limit, specify 0 for this property.

  • If we specify a positive integer, such as 1, 2, or 3 for this custom property, even if a session is not known to have completed, the session manager attempts to invalidate the session if the indicated time period since the last access occurred has elapsed. This time period is the result of multiplying the value specified for this property and the value specified for the Session Timeout property. For example, if we specify 2 minutes for the Session Timeout property and 2 for the ForceSessionInvalidationMultiple property, the session manager attempts to invalidate the session after 4 minutes.

    To invalidate the sessions after a certain amount of time has elapsed, specify the appropriate positive integer for this property.

Name Value
ForceSessionInvalidationMultiple 1

HTTPS requests with an SSL offloader

The custom property custom property...

httpsIndicatorHeader manages HTTPS requests that are forwarded to an appserver from an SSL offloader used in front of WAS. When an HTTPS request is received by an SSL offloader it is redirected over HTTP to an appserver using WAS. The SSL offloader adds a header indicating the original request was over HTTP. The httpsIndicatorHeader property specifies the header name added by the SSL box. The appserver checks this indicator to determine if SSL is required. If it determines the request is SSL over HTTP, an HTTPS scheme is chosen.

Name Value
httpsIndicatorHeader Request header key name

Use the session ID that is sent from a browser to preserve session data

The custom property HttpSessionIdReuse determines whether the session manager can use the session ID sent from a browser to preserve session data across Web apps that are running in an environment not configured for session persistence. In a multi-JVM environment not configured for session persistence setting this property to true enables the session manager to use the same session information for all of a user's requests even if the Web apps that are handling these requests are governed by different JVMs. The default value for this property is false.

The use of the HttpSessionIdReuse property as a Web container custom property is deprecated. We can now define it as a session management custom property.

To enable the session manager ton use the session ID sent from a browser to preserve session data across Web apps that are running in an environment not configured for session persistence, use the following name-value pair:

Name Value
HttpSessionIdReuse true

Global configuration of servlet listeners

The servlet spec supports applications registering listeners for servlet-related events on an individual application basis through the web.xml descriptor. However, using the listeners custom property, a server can listen to servlet events across Web apps. To implement global listening, a listener is registered at the Web container level and is propagated to all of the installed and new Web apps. This global behavior of internal servlet listeners is controlled by the listeners custom property by using the following name-value pair format.

Name Value
listeners listener_class

The values for this property is a string specifying a comma separated list of listener classes. The listener supplied must implement standard listener classes from the Java Servlet API or IBM listener extension classes.

Use Uniform Resource Locators (URLs) without leading front slashes ( / )

WAS 5.x supports Uniform Resource Locators (URLs) without leading front slashes ( /) and to preserve compatibility, We can set the custom property, prependSlashToResource to true. To ignore the spec and consider URLs without the leading front slash, use the following name-value pair.

Name Value
prependSlashToResource true

UseOracleBLOB

The UseOracleBLOB custom property creates the HTTP session database table using the Binary Large Object (BLOB) data type for the medium column. Increases performance of persistent sessions when Oracle databases are used. Due to an Oracle restriction, BLOB support requires use of the oci database driver for Oracle for more than 4000 bytes of data. You must also ensure that a new sessions table is created before the server is restarted by dropping the old sessions table or by changing the datasource definition to reference a database that does not contain a sessions table.

The use of the UseOracleBLOB property as a Web container custom property is deprecated. We can now define it as a session management custom property.

To create a sessions table using the BLOB data type, use the following name-value pair:

Name Value
UseOracleBLOB true

Convert start and end attributes of the repeat tag to strings

Set the com.ibm.wsspi.jsp.convertAttrValueToString Web container custom property to true to convert start and end attributes of the repeat tag to strings before they are used.

Name Value
com.ibm.wsspi.jsp.convertAttrValueToString true

Disable the commons-el expression cache

Set the customer property...

com.ibm.wsspi.jsp.disableElCache

custom property to true to disable the commons-el expression cache if we are experiencing out of memory conditions because the hash maps are held by the expression evaluator.

Name Value
com.ibm.wsspi.jsp.disableElCache true

Create a FileNotFoundException exception when a JSP file is not found

Set the custom property...

com.ibm.ws.webcontainer.throwMissingJspException

...to true to create a FileNotFoundException when a resource that is included by a JSP file is missing. If this property is not set to true, an error page is displayed.

Name Value
com.ibm.ws.webcontainer.throwMissingJspException true

com.ibm.ws.webcontainer.suppressServletExceptionLogging

If a servlet creates an exception, it is logged in the systemErr log file. For some applications, this is undesirable as it may fill up the log. In WAS V5, servlet exceptions are created but they are not logged in the systemErr log file. Beginning with WAS V6.0.2, all servlet exceptions are logged. Use the following custom property to specify that the Web container does not log the servlet exceptions that are created in the systemErr file:

Name Value
com.ibm.ws.webcontainer.suppressServletExceptionLogging true

Invoke global session listeners

If a system application is the first to start, and the application attempts to load a global listener in a shared library that is associated with the server classloader, the application does not load that listener and prevents the listener from being loaded or invoked by a later non-system application. Set the com.ibm.ws.webcontainer.disableSystemAppGlobalListenerLoading custom property to true to prevent system applications from loading global listeners. When this property is set to true, the system application does not attempt to load the global listeners and later non-system applications can load them from a shared library associated with a server class loader.

Name Value
com.ibm.ws.webcontainer.disableSystemAppGlobalListenerLoading true

Invoking the filter capability

We might need use a custom servlet filter with Web apps to map files from a one URI to another URI that points to a particular resource. For example, we might map URIs that start with my_company to the my_company/external directory. Without enabling the custom property...

com.ibm.ws.webcontainer.invokeFiltersCompatibility

...the Web container does not call any custom servlet filters.

With this custom property, the Web container calls custom servlet filters before looking for welcome files.

If the Web container cannot find a resource, it calls the custom servlet filters before creating a FileNotFoundException exception. This change enables the Web container to verify whether the custom servlet filters modify the path to a resource.

Name Value
com.ibm.ws.webcontainer.invokeFiltersCompatibility true

Controlling active request completion time

By default, when an application is stopped the Web container waits up to 60 seconds for each active request for a resource of that application to complete. We can now define the com.ibm.ws.webcontainer.ServletDestroyWaitTime Web container custom property to control the amount of time that the Web container waits for an active request to complete when the owning application is stopped.

Set the com.ibm.ws.webcontainer.ServletDestroyWaitTime custom property to an integer value, which specifies the number of seconds to wait for a request to complete. The default value is 60 seconds.

Name Value
com.ibm.ws.webcontainer.ServletDestroyWaitTime integer





 

Related tasks

Modify the default Web container configuration

 

Related


HTTP transport custom properties
HTTP session problems
Web services client to Web container optimized communication
JSPs specific Web container custom properties
Web container custom properties