Configures HTTP parameters.
The following table describes subelements for the http element.
Table 1–56 http Subelements
Element |
Required |
Description |
---|---|---|
zero or one |
Configures the HTTP file cache. |
The following table describes attributes for the http element.
Table 1–57 http Attributes
Attribute |
Default |
Description |
---|---|---|
none |
Specifies the id attribute of the default virtual-server for the network-listener that references the parent protocol element. |
|
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. |
|
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. |
|
true |
(optional) If true, X-Powered-By headers are used according to the Servlet 2.4 and JSP 2.0 specifications. |
|
4096 |
(optional) Specifies the size of the request buffer for network-listener elements that reference the parent protocol element. |
|
8192 |
(optional) Specifies the size of the send buffer for network-listener elements that reference the parent protocol element. |
|
false |
(optional) If true, indicates that the network-listener that references the parent protocol element receives traffic from an SSL-terminating proxy server. |
|
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. |
|
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. |
|
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> |
|
off |
(optional) Specifies use of HTTP/1.1 GZIP compression to save server bandwidth. Allowed values are:
If compression is set to on or force, you must set compression-min-size-bytes as well. |
|
none |
(optional) Specifies the minimum size of a file when compression is applied. Required if compression is set to on or force. |
|
text/html,text/xml,text/plain |
(optional) Specifies a comma-separated list of MIME types for which HTTP compression is used. |
|
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. |
|
false |
(optional) If true, the connection for a servlet that reads bytes slowly is closed after the connection-upload-timeout-millis is reached. |
|
5 |
(optional) Specifies the timeout for uploads. Applicable only if upload-timeout-enabled is set to true. |
|
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. |
HTTP/1.1 |
(optional) Specifies the version of the HTTP protocol used. |
|
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. |
|
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. |
|
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. |
|
8192 |
(optional) Specifies the size of the buffer used by the request processing threads to read the request data. |
|
com.sun.grizzly.tcp.StaticResourcesAdapter |
(Optional) Specifies the class name of the static resources adapter. |
|
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. |
|
30 |
(Optional) Specifies the request timeout. If the request is not processed before the timeout is reached, the request is ignored. |
|
false |
(optional) If true, looks up the DNS entry for the client. |
|
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). |
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.
none
The following table describes attributes for the http-access-log element.
Table 1–58 http-access-log Attributes
Attribute |
Default |
Description |
---|---|---|
${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. |
|
true |
(optional) If true, specifies that only the IP address of the user agent is listed. If false, performs a DNS lookup. |
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.
none
The following table describes attributes for the http-file-cache element.
Table 1–59 http-file-cache Attributes
Attribute |
Default |
Description |
---|---|---|
false |
Not implemented. Do not use. |
|
false |
Remapped to the enabled attribute of the file-cache element. |
|
30 |
Remapped to the max-age-seconds attribute of the file-cache element. |
|
537600 |
Not implemented. Do not use. |
|
1048576 |
Remapped to the max-cache-size-bytes attribute of the file-cache element. |
|
2048 |
Not implemented. Do not use. |
|
1048576 |
Not implemented. Do not use. |
|
false |
Not implemented. Do not use. |
|
1024 |
Remapped to the max-files-count attribute of the file-cache element. |
|
0 |
Not implemented. Do not use. |
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.
The following table describes subelements for the http-listener element.
Table 1–60 http-listener Subelements
Element |
Required |
Description |
---|---|---|
zero or one |
Defines Secure Socket Layer (SSL) parameters. |
|
zero or more |
Specifies a property or a variable. |
The following table describes attributes for the http-listener element.
Table 1–61 http-listener Attributes
Attribute |
Default |
Description |
---|---|---|
none |
Remapped to the name attribute of a network-listener element. |
|
none |
Remapped to the address attribute of a network-listener element. |
|
none |
Remapped to the port attribute of a network-listener element. |
|
none |
Not implemented. Do not use. |
|
Not implemented. Do not use. |
||
false |
Not implemented. Do not use. |
|
1 |
Remapped to the acceptor-threads attribute of a transport element. |
|
false |
Remapped to the security-enabled attribute of a protocol element. |
|
none |
Remapped to the default-virtual-server attribute of an http element. |
|
none |
Remapped to the server-name attribute of an http element. |
|
none |
Remapped to the redirect-port attribute of an http element. |
|
true |
Remapped to the xpowered-by attribute of an http element. |
|
enabled |
true |
Remapped to the enabled attribute of a network-listener element. |
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 |
---|---|---|
true |
Not implemented. Do not use. |
|
5000 |
Not implemented. Do not use. |
|
10000 |
Implemented only for http-service. |
|
86400 |
Implemented only for http-service. |
|
100 |
Implemented only for http-service. |
|
true |
Not implemented. Do not use. |
|
0 |
Not implemented. Do not use. |
|
4096 |
Not implemented. Do not use. |
|
4096 |
Not implemented. Do not use. |
|
true |
Remapped to the byte-buffer-type attribute of a transport element. |
|
false |
Remapped to the auth-pass-through-enabled attribute of an http element. |
|
com.sun.enterprise.web.ProxyHandlerImpl |
Implemented only for http-service. |
|
none |
Not implemented. Do not use. |
|
4096 |
Remapped to the buffer-size-bytes attribute of a transport element. |
|
30 |
Implemented only for http-service. |
|
250 |
Remapped to the max-connections attribute of an http element. |
|
true |
Remapped to the trace-enabled attribute of an http element. |
|
false |
Remapped to the comet-support-enabled attribute of an http element. |
|
false |
Remapped to the jk-enabled attribute of a network-listener element. |
|
off |
Remapped to the compression attribute of an http element. |
|
text/html,text/xml,text/plain |
Remapped to the compressable-mime-type attribute of an http element. |
|
empty String (regexp matching disabled) |
Remapped to the no-compression-user-agents attribute of an http element. |
|
none |
Remapped to the compression-min-size-bytes attribute of an http element. |
|
none |
Remapped to the crl-file attribute of an ssl element. |
|
none |
Remapped to the trust-algorithm attribute of an ssl element. |
|
5 |
Remapped to the trust-max-cert-length attribute of an ssl element. |
|
true |
Remapped to the upload-timeout-enabled attribute of an http element. |
|
5 |
Remapped to the connection-upload-timeout-millis attribute of an http element. |
|
UTF-8 |
Remapped to the uri-encoding attribute of an http element. |
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.
none
The following table describes attributes for the http-protocol element.
Table 1–63 http-protocol Attributes
Attribute |
Default |
Description |
---|---|---|
HTTP/1.1 |
Remapped to the version attribute of an http element. |
|
false |
Remapped to the dns-lookup-enabled attribute of an http element. |
|
text/html; charset=iso-8859-1 |
Remapped to the forced-response-type attribute of an http element. |
|
text/html; charset=iso-8859-1 |
Remapped to the default-response-type attribute of an http element. |
|
text/plain; charset=iso-8859-1 |
Remapped to the forced-response-type attribute of an http element. |
|
text/plain; charset=iso-8859-1 |
Remapped to the default-response-type attribute of an http element. |
|
true |
Not implemented. Use ssl subelements of protocol elements. |
Defines the HTTP service.
The following table describes subelements for the http-service element.
Table 1–64 http-service Subelements
Element |
Required |
Description |
---|---|---|
zero or one |
Defines access log settings for each http-access-log subelement of each virtual-server. |
|
one or more |
Not implemented. See the element description for attribute and property remapping. |
|
one or more |
Defines a virtual server. |
|
zero or one |
Not implemented. See the element description for attribute remapping. |
|
zero or one |
Not implemented. See the element description for attribute remapping. |
|
zero or one |
Not implemented. See the element description for attribute remapping. |
|
zero or one |
Not implemented. See the element description for attribute remapping. |
|
zero or one |
Not implemented. See the element description for attribute remapping. |
|
zero or more |
Specifies a property or a variable. |
The following table describes attributes for the http-service element.
Table 1–65 http-service Attributes
Attribute |
Default |
Description |
---|---|---|
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. |
|
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. |
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 |
---|---|---|
10000 |
Specifies the number of SSL sessions to be cached. |
|
86400 |
Specifies the interval at which SSL3 sessions are cached. |
|
100 |
Specifies the interval at which SSL2 sessions are cached. |
|
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. |
|
30 |
Specifies the number of seconds an HTTP network-listener waits, after accepting a connection, for the request URI line to be presented. |