Oracle GlassFish Server 3.0.1 Domain File Format Reference

H

http

Configures HTTP parameters.

Superelements

protocol

Subelements

The following table describes subelements for the http element.

Table 1–56 http Subelements

Element 

Required 

Description 

file-cache

zero or one 

Configures the HTTP file cache. 

Attributes

The following table describes attributes for the http element.

Table 1–57 http Attributes

Attribute 

Default 

Description 

default-virtual-server

none 

Specifies the id attribute of the default virtual-server for the network-listener that references the parent protocol element.

server-name

none 

(optional) Tells the server what to put in the host name section of any URLs it sends to the client. This affects URLs the server automatically generates; it doesn’t affect the URLs for directories and files stored in the server. If your server uses an alias, the server-name should be the alias name.

If a colon and port number are appended, that port is used in URLs the server sends to the client. 

redirect-port

none 

(optional) If the network-listener that references the parent protocol element is supporting non-SSL requests and a request is received for which a matching security-constraint requires SSL transport, the request is automatically redirected to the port number specified here.

xpowered-by

true

(optional) If true, X-Powered-By headers are used according to the Servlet 2.4 and JSP 2.0 specifications.

request-body-buffer-size-bytes

4096

(optional) Specifies the size of the request buffer for network-listener elements that reference the parent protocol element.

send-buffer-size-bytes

8192

(optional) Specifies the size of the send buffer for network-listener elements that reference the parent protocol element.

auth-pass-through-enabled

false

(optional) If true, indicates that the network-listener that references the parent protocol element receives traffic from an SSL-terminating proxy server.

max-connections

250

(optional) Specifies the maximum number of requests that can be pipelined until the connection is closed by the server. Set this property to 1 to disable HTTP/1.0 keep-alive, as well as HTTP/1.1 keep-alive and pipelining. A value of 0 means requests are always rejected. A value of -1 sets no limit to the number of keep-alive connections.

The default of 250 is the initial value set in domain.xml. The internal configuration default is 256.

trace-enabled

true

(optional) If true, enables the TRACE operation. Set this property to false to make the GlassFish Server less susceptible to cross-site scripting attacks.

comet-support-enabled

false

(optional) If true, enables Comet support for the network-listener that references the parent protocol element.

If your servlet or JSP page uses Comet technology, make sure it is initialized when the GlassFish Server starts up by adding the load-on-startup element to your web.xml file. For example:

<servlet>
   <servlet-name>CheckIn</servlet-name>
   <servlet-class>CheckInServlet</servlet-class>
   <load-on-startup>0</load-on-startup>
</servlet>

compression

off

(optional) Specifies use of HTTP/1.1 GZIP compression to save server bandwidth. Allowed values are: 

  • off — Disables compression.

  • on — Compresses data.

  • force — Forces data compression in all cases.

If compression is set to on or force, you must set compression-min-size-bytes as well.

compression-min-size-bytes

none 

(optional) Specifies the minimum size of a file when compression is applied. Required if compression is set to on or force.

compressable-mime-type

text/html,text/xml,text/plain

(optional) Specifies a comma-separated list of MIME types for which HTTP compression is used. 

no-compression-user-agents

empty String (regexp matching disabled)

(optional) Specifies a comma-separated list of regular expressions matching user-agents of HTTP clients for which compression should not be used. 

upload-timeout-enabled

false

(optional) If true, the connection for a servlet that reads bytes slowly is closed after the connection-upload-timeout-millis is reached.

connection-upload-timeout-millis

5

(optional) Specifies the timeout for uploads. Applicable only if upload-timeout-enabled is set to true.

uri-encoding

UTF-8

(optional) Specifies the character set used to decode the request URIs received on the network-listener that references the parent protocol element. Must be a valid IANA character set name.

restricted-user-agents

none 

(optional) Specifies a list of restricted user agents on which HTTP compression is applied. If no user agents are specified (the default), HTTP compression is applied to all user agents. 

chunking-enabled

true

(optional) If true, enables HTTP response chunking.

version

HTTP/1.1

(optional) Specifies the version of the HTTP protocol used. 

forced-response-type

text/html; charset=iso-8859-1

(optional) Specifies the request type used if no MIME mapping is available that matches the file extension. The format is a semicolon-delimited string consisting of the content-type, encoding, language, and charset. 

default-response-type

text/html; charset=iso-8859-1

(optional) Specifies the default response type. The format is a semicolon-delimited string consisting of the content-type, encoding, language, and charset. 

timeout-seconds

30

(optional) Specifies the maximum time for which a keep alive connection is kept open. A value of 0 or less means keep alive connections are kept open indefinitely.

header-buffer-length-bytes

8192

(optional) Specifies the size of the buffer used by the request processing threads to read the request data. 

adapter

com.sun.grizzly.tcp.StaticResourcesAdapter

(Optional) Specifies the class name of the static resources adapter. 

max-post-size-bytes

2097152

(Optional) Specifies the maximum size of the body of a POST request. POST requests greater than this size are rejected. A value of zero means the maximum post size is unlimited. 

request-timeout-seconds

30

(Optional) Specifies the request timeout. If the request is not processed before the timeout is reached, the request is ignored. 

dns-lookup-enabled

false

(optional) If true, looks up the DNS entry for the client.

rcm-support-enabled

false

(optional) If true, enables support for resource consumption management (RCM). A ResourceAllocationFilter is added to the HTTP protocol chain, and a thread pool for request processing is assigned to each HTTP resource (such as a web application).

http-access-log

Defines an access log file for a virtual-server. The access-log subelement of the virtual server’s parent http-service element determines the access log file’s format and rotation settings.

Superelements

virtual-server

Subelements

none

Attributes

The following table describes attributes for the http-access-log element.

Table 1–58 http-access-log Attributes

Attribute 

Default 

Description 

log-directory

${com.sun.aas.instanceRoot}/logs/access

(optional) Specifies the location of the access log file. The ${com.sun.aas.instanceRoot} system property refers to the domain-dir. See system-property.

iponly

true

(optional) If true, specifies that only the IP address of the user agent is listed. If false, performs a DNS lookup.

http-file-cache

This element is not supported. If this element is present in the domain.xml file, its attributes are remapped to other elements and then it is deleted. For remapping details, see the Attributes table for this element.

Superelements

http-service

Subelements

none

Attributes

The following table describes attributes for the http-file-cache element.

Table 1–59 http-file-cache Attributes

Attribute 

Default 

Description 

globally-enabled

false

Not implemented. Do not use. 

file-caching-enabled

false

Remapped to the enabled attribute of the file-cache element.

max-age-in-seconds

30

Remapped to the max-age-seconds attribute of the file-cache element.

medium-file-size-limit-in-bytes

537600

Not implemented. Do not use. 

medium-file-space-in-bytes

1048576

Remapped to the max-cache-size-bytes attribute of the file-cache element.

small-file-size-limit-in-bytes

2048

Not implemented. Do not use. 

small-file-space-in-bytes

1048576

Not implemented. Do not use. 

file-transmission-enabled

false

Not implemented. Do not use. 

max-files-count

1024

Remapped to the max-files-count attribute of the file-cache element.

hash-init-size

0

Not implemented. Do not use. 

http-listener

This element is not supported. If this element is present in the domain.xml file, its attributes and properties are remapped to other elements and then it is deleted. For remapping details, see the Attributes and Properties tables for this element.

Superelements

http-service

Subelements

The following table describes subelements for the http-listener element.

Table 1–60 http-listener Subelements

Element 

Required 

Description 

ssl

zero or one 

Defines Secure Socket Layer (SSL) parameters. 

property

zero or more 

Specifies a property or a variable. 

Attributes

The following table describes attributes for the http-listener element.

Table 1–61 http-listener Attributes

Attribute 

Default 

Description 

id

none 

Remapped to the name attribute of a network-listener element.

address

none 

Remapped to the address attribute of a network-listener element.

port

none 

Remapped to the port attribute of a network-listener element.

external-port

none 

Not implemented. Do not use. 

family

 

Not implemented. Do not use. 

blocking-enabled

false

Not implemented. Do not use. 

acceptor-threads

1

Remapped to the acceptor-threads attribute of a transport element.

security-enabled

false

Remapped to the security-enabled attribute of a protocol element.

default-virtual-server

none 

Remapped to the default-virtual-server attribute of an http element.

server-name

none 

Remapped to the server-name attribute of an http element.

redirect-port

none 

Remapped to the redirect-port attribute of an http element.

xpowered-by

true

Remapped to the xpowered-by attribute of an http element.

enabled

true

Remapped to the enabled attribute of a network-listener element.

Properties

The following table describes property remappings for the http-listener element. A few of these properties can be defined as http-service properties, applying to all network-listener elements.

Table 1–62 http-listener Properties

Property 

Default 

Description 

monitoring-cache-enabled

true

Not implemented. Do not use. 

monitoring-cache-refresh-in-millis

5000

Not implemented. Do not use. 

ssl-cache-entries

10000

Implemented only for http-service.

ssl3-session-timeout

86400

Implemented only for http-service.

ssl-session-timeout

100

Implemented only for http-service.

recycle-objects

true

Not implemented. Do not use. 

reader-threads

0

Not implemented. Do not use. 

acceptor-queue-length

4096

Not implemented. Do not use. 

reader-queue-length

4096

Not implemented. Do not use. 

use-nio-direct-bytebuffer

true

Remapped to the byte-buffer-type attribute of a transport element.

authPassthroughEnabled

false

Remapped to the auth-pass-through-enabled attribute of an http element.

proxyHandler

com.sun.enterprise.web.ProxyHandlerImpl

Implemented only for http-service.

proxiedProtocol

none 

Not implemented. Do not use. 

bufferSize

4096

Remapped to the buffer-size-bytes attribute of a transport element.

connectionTimeout

30

Implemented only for http-service.

maxKeepAliveRequests

250

Remapped to the max-connections attribute of an http element.

traceEnabled

true

Remapped to the trace-enabled attribute of an http element.

cometSupport

false

Remapped to the comet-support-enabled attribute of an http element.

jkEnabled

false

Remapped to the jk-enabled attribute of a network-listener element.

compression

off

Remapped to the compression attribute of an http element.

compressableMimeType

text/html,text/xml,text/plain

Remapped to the compressable-mime-type attribute of an http element.

noCompressionUserAgents

empty String (regexp matching disabled)

Remapped to the no-compression-user-agents attribute of an http element.

minCompressionSize or compressionMinSize

none 

Remapped to the compression-min-size-bytes attribute of an http element.

crlFile

none 

Remapped to the crl-file attribute of an ssl element.

trustAlgorithm

none  

Remapped to the trust-algorithm attribute of an ssl element.

trustMaxCertLength

5

Remapped to the trust-max-cert-length attribute of an ssl element.

disableUploadTimeout

true

Remapped to the upload-timeout-enabled attribute of an http element.

connectionUploadTimeout

5

Remapped to the connection-upload-timeout-millis attribute of an http element.

uriEncoding

UTF-8

Remapped to the uri-encoding attribute of an http element.

http-protocol

This element is not supported. If this element is present in the domain.xml file, its attributes are remapped to other elements and then it is deleted. For remapping details, see the Attributes table for this element.

Superelements

http-service

Subelements

none

Attributes

The following table describes attributes for the http-protocol element.

Table 1–63 http-protocol Attributes

Attribute 

Default 

Description 

version

HTTP/1.1

Remapped to the version attribute of an http element.

dns-lookup-enabled

false

Remapped to the dns-lookup-enabled attribute of an http element.

forced-type

text/html; charset=iso-8859-1

Remapped to the forced-response-type attribute of an http element.

default-type

text/html; charset=iso-8859-1

Remapped to the default-response-type attribute of an http element.

forced-response-type

text/plain; charset=iso-8859-1

Remapped to the forced-response-type attribute of an http element.

default-response-type

text/plain; charset=iso-8859-1

Remapped to the default-response-type attribute of an http element.

ssl-enabled

true

Not implemented. Use ssl subelements of protocol elements.

http-service

Defines the HTTP service.

Superelements

config

Subelements

The following table describes subelements for the http-service element.

Table 1–64 http-service Subelements

Element 

Required 

Description 

access-log

zero or one 

Defines access log settings for each http-access-log subelement of each virtual-server.

http-listener

one or more 

Not implemented. See the element description for attribute and property remapping. 

virtual-server

one or more 

Defines a virtual server. 

request-processing

zero or one 

Not implemented. See the element description for attribute remapping. 

keep-alive

zero or one 

Not implemented. See the element description for attribute remapping. 

connection-pool

zero or one 

Not implemented. See the element description for attribute remapping. 

http-protocol

zero or one 

Not implemented. See the element description for attribute remapping. 

http-file-cache

zero or one 

Not implemented. See the element description for attribute remapping. 

property

zero or more 

Specifies a property or a variable. 

Attributes

The following table describes attributes for the http-service element.

Table 1–65 http-service Attributes

Attribute 

Default 

Description 

access-logging-enabled

false

If true, enables access logging for all virtual-server subelements that specify this attribute as true or inherit. If false, disables access logging for all virtual-server subelements that specify this attribute as false or inherit.

sso-enabled

false

If true, single sign-on is enabled by default for all web applications on all virtual servers on this server instance that are configured for the same realm. If false, single sign-on is disabled by default for all virtual servers, and users must authenticate separately to every application on each virtual server.

A true or false setting of the sso-enabled attribute of the virtual-server element overrides this setting for an individual virtual server. An inherit setting of the sso-enabled attribute of the virtual-server element uses this setting for an individual virtual server.

At the http-service level, you cannot change the sso-max-inactive-seconds and sso-reap-interval-seconds values from their defaults. However, you can change these values at the virtual-server level.

Properties

The following table describes properties for the http-service element that are still supported. These properties apply to all network-listener elements.

Most properties for this element are no longer supported. For information about how other properties have been remapped, see the Properties table for http-listener.

Table 1–66 http-service Properties

Property 

Default 

Description 

ssl-cache-entries

10000

Specifies the number of SSL sessions to be cached. 

ssl3-session-timeout

86400

Specifies the interval at which SSL3 sessions are cached. 

ssl-session-timeout

100

Specifies the interval at which SSL2 sessions are cached. 

proxyHandler

com.sun.enterprise.web.ProxyHandlerImpl

Specifies the fully qualified class name of a custom implementation of the com.sun.appserv.ProxyHandler abstract class, which allows a back-end server instance to retrieve information about the original client request that was intercepted by an SSL-terminating proxy server. An implementation of this abstract class inspects a given request for the custom request headers through which the proxy server communicates the information about the original client request to the GlassFish Server instance, and returns that information to its caller.

The default implementation reads the client IP address from an HTTP request header named Proxy-ip, the SSL keysize from an HTTP request header named Proxy-keysize, and the SSL client certificate chain from an HTTP request header named Proxy-auth-cert. The Proxy-auth-cert value must contain the BASE-64 encoded client certificate chain without the BEGIN CERTIFICATE and END CERTIFICATE boundaries and with \n replaced with % d% a.

Only used if the auth-pass-through-enabled attribute of the network-listener element's grandchild http element is set to true.

connectionTimeout

30

Specifies the number of seconds an HTTP network-listener waits, after accepting a connection, for the request URI line to be presented.