Chapter 15. Web Subsystem

15.1. Configure the Web Subsystem

You can configure most aspects of the Web subsystem using the web-based Management Console or the command-line Management CLI. Each setting is explained in the order it appears in the Management Console, and Management CLI commands are also provided.
View the Web Subsystem Using the Management Console

To configure the Web Subsystem using the web-based Management Console, click the Profile(s) tab at the top right. For a managed domain, select the server profile you wish to configure from the Profile selection box at the top left. Expand the Subsystems menu, then expand the Web menu. Each configurable part of the Web subsystem is shown.

Note

The mod_cluster component is only available if your profile is ha or full-ha, in a managed domain, or if you start your standalone server with the standalone-ha or standalone-full-ha profile. mod_cluster configuration is covered in Section 16.5.2, “Configure the mod_cluster Subsystem”.
Configure the JSP Container, HTTP Connectors, and Virtual HTTP Servers

To configure the JSP Container, HTTP connectors, and virtual HTTP servers, click the Servlet/HTTP menu entry. Click the Edit button to change any values. Click the Advanced button to view advanced options. The options are explained below. Options for HTTP connectors and virtual servers are shown in separate tables.

Table 15.1. Servlet/HTTP Configuration Options

Option Description CLI Command
Disabled?
If true, disables the Java ServerPages (JSP) container. Defaults to false. This is useful if you do not use any Java ServerPages (JSPs).
/profile=full-ha/subsystem=web/configuration=jsp-configuration/:write-attribute(name=disabled,value=false)
Development?
If true, enables Development Mode, which produces more verbose debugging information. Defaults to false.
/profile=full-ha/subsystem=web/configuration=jsp-configuration/:write-attribute(name=development,value=false)
Keep Generated?
Click Advanced to see this option, if it is hidden. If true keeps generated Servlets. Enabled by default.
/profile=full-ha/subsystem=web/configuration=jsp-configuration/:write-attribute(name=keep-generated,value=true)
Check Interval?
Click Advanced to see this option, if it is hidden. A value in seconds, which determines how often to check for JSP updates using a background process. Defaults to 0.
/profile=full-ha/subsystem=web/configuration=jsp-configuration/:write-attribute(name=check-interval,value=0)
Display Source?
Click Advanced to see this option, if it is hidden. If true, the JSP source fragment is displayed when a runtime error occurs. Defaults to true.
/profile=full-ha/subsystem=web/configuration=jsp-configuration/:write-attribute(name=display-source-fragment,value=true)
AJP and HTTP connectors use mod_cluster, mod_jk, mod_proxy, ISAPI, and NSAPI for load balancing and HA clustering. To configure a connector, select the Connectors tab and click Add. To remove a connector, select its entry and click Remove. To edit a connector, select its entry and click Edit.
When you create a new connector using the Management CLI, its options are all set at once, as in the following command:

Example 15.1. Create a New Connector

/profile=full-ha/subsystem=web/connector=ajp/:add(socket-binding=ajp,scheme=http,protocol=AJP/1.3,secure=false,name=ajp,max-post-size=2097152,enabled=true,enable-lookups=false,redirect-port=8433,max-save-post-size=4096)

Table 15.2. Connector Options

Option Description CLI Command
Name
A unique name for the connector, for display purposes.
/profile=full-ha/subsystem=web/connector=ajp/:read-attribute(name=name)
Socket Binding
The named socket binding the connector should bind to. A socket binding is a mapping between a socket name and a network port. Socket bindings are configured for each standalone server, or via socket binding groups in a managed domain. A socket binding group is applied to a server group.
/profile=full-ha/subsystem=web/connector=ajp/:write-attribute(name=socket-binding,value=ajp)
Scheme
The web connector scheme, such as HTTP or HTTPS.
/profile=full-ha/subsystem=web/connector=ajp/:write-attribute(name=scheme,value=http)
Protocol
The web connector protocol to use, such as AJP or HTTP.
/profile=full-ha/subsystem=web/connector=ajp/:write-attribute(name=protocol,value=AJP/1.3)
Enabled
Whether or not this web connector is enabled.
/profile=full-ha/subsystem=web/connector=ajp/:write-attribute(name=enabled,value=true)
To configure virtual servers, click the Virtual Servers tab. Use the Add button to add a new virtual server. To edit or remove a virtual server, select its entry and click the Edit or Remove button.
When you add a new virtual server using the Management CLI, all required options are set at once, as in the following command.

Example 15.2. Add a New Virtual Server

/profile=full-ha/subsystem=web/virtual-server=default-host/:add(enable-welcome-root=true,default-web-module=ROOT.war,alias=["localhost","example.com"],name=default-host)

Table 15.3. Virtual Servers Options

Option Description CLI Command
Name
A unique name for the virtual server, for display purposes.
Alias
A list of hostnames which should match this virtual server. In the Management Console, use one hostname per line.
/profile=full-ha/subsystem=web/virtual-server=default-host/:write-attribute(name=alias,value=["localhost","example.com"])
Default Module
The module whose web application should be deployed at the root node of this virtual server, and will be displayed when no directory is given in the HTTP request.
/profile=full-ha/subsystem=web/virtual-server=default-host/:write-attribute(name=default-web-module,value=ROOT.war)
Configure Web Services Options

To configure Web Services options, click the Web Services menu item. The options are explained in the table below.

Table 15.4. Web Services Configuration Options

Option Description CLI Command
Modify WSDL Address
Whether the WSDL address can be modified by applications. Defaults to true.
/profile=full-ha/subsystem=webservices/:write-attribute(name=modify-wsdl-address,value=true)
WSDL Host
The WSDL contract of a JAX-WS Web Service includes a <soap:address> element which points to the location of the endpoint. If the value of <soap:address> is a valid URL, it is not overwritten unless modify-wsdl-address is set to true. If the value of <soap:address> is not a valid URL, it is overwritten using the values of wsdl-host and either wsdl-port or wsdl-secure-port. If wsdl-host is set to jbossws.undefined.host, the requester's host address is used when the <soap-address> is rewritten. Defaults to ${jboss.bind.address:127.0.0.1}, which uses 127.0.0.1 if no bind address is specified when JBoss EAP 6 is started.
/profile=full-ha/subsystem=webservices/:write-attribute(name=wsdl-host,value=127.0.0.1)
WSDL Port
The non-secure port that is used to rewrite the SOAP address. If this is set to 0 (the default), the port is identified by querying the list of installed connectors.
/profile=full-ha/subsystem=webservices/:write-attribute(name=wsdl-port,value=80)
WSDL Secure Port
The secure port that is used to rewrite the SOAP address. If this is set to 0 (the default), the port is identified by querying the list of installed connectors.
/profile=full-ha/subsystem=webservices/:write-attribute(name=wsdl-secure-port,value=443)