Configures a network listener.
When you first install the GlassFish Server, three network-listener elements exist by default, with name values of admin-listener, http-listener1, and http-listener2. The http-listener2, which is set up with SSL, is disabled by default.
Network listeners are affected by properties of http-service.
none
The following table describes attributes for the network-listener element.
Table 1–116 network-listener Attributes
Attribute |
Default |
Description |
---|---|---|
none |
The unique listener name. A network-listener name cannot begin with a number. |
|
none |
IP address of the listener. Can be in dotted-pair or IPv6 notation. Can be any (for INADDR_ANY) to listen on all IP addresses. Can be a hostname. |
|
enabled |
true |
(optional) Determines whether the listener is active. If set to false, any attempts to connect to the listener result in a socket exception (java.net.ConnectException). In GlassFish Server versions prior to 9.1, a listener whose enabled attribute was set to false returned a 404 response code for any requests sent to it. To achieve this behavior in the current GlassFish Server version, set the listener's enabled attribute to true, and set every associated virtual server's state to off. A virtual-server lists its associated listeners in its network-listeners attribute. |
false |
(optional) If true, enables mod_jk support for this listener. |
|
none |
Port number on which the listener listens. Legal values are 1 - 65535. On UNIX, creating sockets that listen on ports 1 - 1024 requires superuser privileges. Configuring an SSL listener to listen on port 443 is standard. |
|
none |
Specifies the name of the protocol associated with this network listener. Although this attribute is required, a protocol is automatically created with the same name as the network listener when you use the asadmin create-http-listener command to create a network listener. |
|
none |
(Optional) Specifies the name of the thread-pool associated with this network listener. |
|
none |
Specifies the name of the transport associated with this network listener. Although this attribute is required, the default transport is used when you use the asadmin create-http-listener command to create a network listener. |