Sun GlassFish Enterprise Server v3 Domain File Format Reference

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 Enterprise 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 Enterprise 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).