Red Hat Training

A Red Hat training course is available for Red Hat JBoss Enterprise Application Platform

15.5. System Properties in JBossWeb

This section lists the system properties that may be used to modify the default JBossWeb behavior. The system-properties can be set in the JBoss Enterprise Web Application configuration. You must restart it to get them applied to the web sub system.
Following is an example on how to modify the system-properties in JBossWeb
standalone@localhost:9999 /] ./system-property=org.apache.catalina.JSESSIONID:add(value="MYID")
{"outcome" => "success"}
standalone@localhost:9999 /] shutdown
Communication error: Channel closed
Closed connection to localhost:9999
For some properties, you can restart it using a reload command.
Following is an example to restart using a reload command.
[standalone@localhost:9999 /] reload
{
    "outcome" => "success",
    "response-headers" => {
        "operation-requires-reload" => true,
        "process-state" => "reload-required"
    }
}

Table 15.1. Servlet container and connectors

Attribute Description
jvmRoute
Provides a default value for the jvmRoute attribute. It does not override the automatically generated value used when using ha read with using configuration like standalone-ha.xml
It supports reload.
org.apache.tomcat.util.buf.StringCache.byte.enabled If true, the String cache is enabled for ByteChunk. If the value is not specified, the default value of false is used.
org.apache.tomcat.util.buf.StringCache.char.enabled If true, the String cache is enabled for CharChunk. If the value is not specified, the default value of false is used.
org.apache.tomcat.util.buf.StringCache.cacheSize The size of the String cache. If the value is not specified, the default value of 5000 is used.
org.apache.tomcat.util.buf.StringCache.maxStringSize The maximum length of String that will be cached. If the value is not specified, the default value of 128 is used.
org.apache.tomcat.util.http.FastHttpDateFormat.CACHE_SIZE The size of the cache to use parsed and formatted date value. If the value is not specified, the default value of 1000 is used.
org.apache.catalina.core.StandardService.DELAY_CONNECTOR_STARTUP If true, the connector startup is not done automatically. It is useful in embedded mode.
org.apache.catalina.connector.Request.SESSION_ID_CHECK If true, the Servlet container verifies that a session exists in a context with the specified session id before creating a session with that id.
org.apache.coyote.USE_CUSTOM_STATUS_MSG_IN_HEADER If true, custom HTTP status messages are used within HTTP headers. Users must ensure that any such message is ISO-8859-1 encoded, particularly if user provided input is included in the message, to prevent a possible XSS vulnerability. If value is not specified the default value of false is used.
org.apache.tomcat.util.http.Parameters.MAX_COUNT The maximum amount of parameters that can be parsed in a post body. If exceeded, parsing fails using an IllegalStateException. The default value is 512 parameters.
org.apache.tomcat.util.http.MimeHeaders.MAX_COUNT
The maximum amount of headers that can be sent in the HTTP request. If exceeded, parsing will fail using an IllegalStateException. The default value is 128 headers.
org.apache.tomcat.util.net.MAX_THREADS The maximum number of threads a connector is going to use to process requests. The default value is 32 x Runtime.getRuntime().availableProcessors(). (512 x Runtime.getRuntime().availableProcessors() for the JIO connector)
org.apache.coyote.http11.Http11Protocol.MAX_HEADER_SIZE The maximum size of the HTTP headers, in bytes. If exceeded, parsing will fail using an ArrayOutOfBoundsExceptions. The default value is 8192 bytes.
org.apache.coyote.http11.Http11Protocol.COMPRESSION Allows using simple compression with the HTTP connector. The default value is off, and compression can be enabled using the value on to enable it conditionally, or force to always enable it.
org.apache.coyote.http11.Http11Protocol.COMPRESSION_RESTRICTED_UA User agents regexps that will not receive compressed content. The default value is empty.
org.apache.coyote.http11.Http11Protocol.COMPRESSION_MIME_TYPES Content type prefixes of compressible content. The default value is text/html,text/xml,text/plain.
org.apache.coyote.http11.Http11Protocol.COMPRESSION_MIN_SIZE Minimum size of content that will be compressed. The default value is 2048 bytes.
org.apache.coyote.http11.DEFAULT_CONNECTION_TIMEOUT Default socket timeout. The default value is 60000 ms.
org.jboss.as.web.deployment.DELETE_WORK_DIR_ONCONTEXTDESTROY Use this property to remove .java and .class files to ensure that JSP sources are recompiled. The default value is false. Default socket timeout for keep alive. The default value is -1 ms, which means it will use the default socket timeout.
org.apache.tomcat.util.buf.StringCache.trainThreshold Specifies the number of times toString() must be invoked before activating cache. The default value is 100000.

Table 15.2. EL

Attribute Description
org.apache.el.parser.COERCE_TO_ZERO If true, when coercing expressions to numbers "" and null will be coerced to zero as required by the specification. If value is not specified, the default value of true is used.

Table 15.3. JSP

Attribute Description
org.apache.jasper.compiler.Generator.VAR_EXPRESSIONFACTORY The name of the variable to use for the expression language expression factory. If value is not specified, the default value of _el_expressionfactory is used.
org.apache.jasper.compiler.Generator.VAR_INSTANCEMANAGER The name of the variable to use for the instance manager factory. If value is not specified, the default value of _jsp_instancemanager is used.
org.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING If false, the requirements for escaping quotes in JSP attributes are relaxed so that a missing required quote does not cause an error. If value is not specified, the specification compliant default of true is used.
org.apache.jasper.Constants.DEFAULT_TAG_BUFFER_SIZE Any tag buffer that expands beyond org.apache.jasper.Constants.DEFAULT_TAG_BUFFER_SIZE is destroyed and a new buffer is created of the default size. If value is not specified, the default value of 512 is used.
org.apache.jasper.runtime.JspFactoryImpl.USE_POOL If true, a ThreadLocal PageContext pool is used. If value is not specified, the default value of true is used.
org.apache.jasper.runtime.JspFactoryImpl.POOL_SIZE The size of the ThreadLocal PageContext. If value is not specified, the default value of 8 is used.
org.apache.jasper.Constants.JSP_SERVLET_BASE The base class of the Servlets generated from the JSPs. If value is not specified, the default value of org.apache.jasper.runtime.HttpJspBase is used.
org.apache.jasper.Constants.SERVICE_METHOD_NAME The name of the service method called by the base class. If value is not specified, the default value of _jspService is used.
org.apache.jasper.Constants.SERVLET_CLASSPATH The name of the ServletContext attribute that provides the classpath for the JSP. If value is not specified, the default value of org.apache.catalina.jsp_classpath is used.
org.apache.jasper.Constants.JSP_FILE The name of the request attribute for <jsp-file> element of a servlet definition. If present on a request, this overrides the value returned by request.getServletPath() to select the JSP page to be executed. If value is not specified, the default value of org.apache.catalina.jsp_file is used.
org.apache.jasper.Constants.PRECOMPILE The name of the query parameter that causes the JSP engine to just pregenerate the servlet but not invoke it. If value is not specified, the default value of org.apache.catalina.jsp_precompile is used.
org.apache.jasper.Constants.JSP_PACKAGE_NAME The default package name for compiled jsp pages. If value not specified, the default value of org.apache.jsp is used.
org.apache.jasper.Constants.TAG_FILE_PACKAGE_NAME The default package name for tag handlers generated from tag files. If value is not specified, the default value of org.apache.jsp.tag is used.
org.apache.jasper.Constants.TEMP_VARIABLE_NAME_PREFIX Prefix to use for generated temporary variable names. If value is not specified, the default value of _jspx_temp is used.
org.apache.jasper.Constants.USE_INSTANCE_MANAGER_FOR_TAGS If true, the instance manager is used to obtain tag handler instances. If value is not specified, true is used.
org.apache.jasper.Constants.INJECT_TAGS If true, annotations specified in tags will be processed and injected. This can have a performance impact when using simple tags, or if tag pooling is disabled. If value is not specified, false is used.

Table 15.4. Security

Attribute Description
org.apache.catalina.connector.RECYCLE_FACADES If this is true or if a security manager is in use a new facade object is created for each request. If value is not specified, the default value of false is used.
org.apache.catalina.connector.CoyoteAdapter.ALLOW_BACKSLASH If this is true the '\' character is permitted as a path delimiter. If value is not specified, the default value of false is used.
org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH If this is true '%2F' and '%5C' is permitted as path delimiters. If value is not specified, the default value of false is used.

Table 15.5. Specification

Attribute Description
org.apache.catalina.STRICT_SERVLET_COMPLIANCE
If value is not specified, true is used. If this is true the following actions will occur:
  • any wrapped request or response object passed to an application dispatcher is checked to ensure that it has wrapped the original request or response. (SRV.8.2 / SRV.14.2.5.1)
  • a call to Response.getWriter() if no character encoding has been specified results in subsequent calls to Response.getCharacterEncoding() returning ISO-8859-1 and the Content-Type response header will include a charset=ISO-8859-1 component. (SRV.15.2.22.1)
  • every request that is associated with a session causes the session's last accessed time to be updated regardless of whether or not the request explicity accesses the session. (SRV.7.6)
org.apache.catalina.core.StandardWrapperValve.SERVLET_STATS If true or if org.apache.catalina.STRICT_SERVLET_COMPLIANCE is true, the wrapper will collect the JSR-77 statistics for individual servlets. If value is not specified, the default value of false is used.
org.apache.catalina.session.StandardSession.ACTIVITY_CHECK If this is true or if org.apache.catalina.STRICT_SERVLET_COMPLIANCE is true Tomcat tracks the number of active requests for each session. When determining if a session is valid, any session with at least one active request is always be considered valid. If value is not specified, the default value of false is used.