Chapter 17. Web Subsystem
17.1. Configure the Web Subsystem
To configure the Web Subsystem using the web-based Management Console, click the Configuration tab at the top of the screen. Expand the Subsystems menu and then expand the Web menu. Each configurable part of the Web subsystem is shown.
Note
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 19.5.2, “Configure the mod_cluster
Subsystem”.
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 17.1. Servlet/HTTP Configuration Options
Option | Description | CLI Command |
---|---|---|
Instance ID |
The identifier used to enable session affinity in load balancing scenarios. The identifier must be unique across all JBoss EAP servers in the cluster and is appended to the generated session identifier. This allows the front-end proxy to forward the specific session to the same JBoss EAP instance. The instance ID is not set as a default.
|
/profile=full-ha/subsystem=web:write-attribute(name=instance-id,value=worker1) |
Disabled? |
If
true , disables the Java ServerPages (JSP) container. Defaults to false . This is useful if you do not use any 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. Defaults to true .
|
/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) |
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.
Example 17.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 17.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 to which the connector is to be bound. 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) |
Redirect Port |
Used to specify a port number to be used in cases of redirection; the common ones being redirection to secure (
https ) or AJP connector
|
/profile=full-ha/subsystem=web/connector=http:write-attribute(name=redirect-port,value=8443) |
Redirect Binding |
Redirect binding is similar to redirect port in terms of behavior except that it requires specification of a socket-binding name in "value" instead of a port number.
redirect-binding provides higher configuration flexibility because it allows the use of pre-defined socket binding (https, AJP etc.) to the specific port for redirection. It gives the same results as redirect-port option.
|
/profile=full-ha/subsystem=web/connector=http:write-attribute(name=redirect-binding,value=https) |
Example 17.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 17.3. Virtual Servers Options
Option | Description | CLI Command |
---|---|---|
Name |
A unique name for the virtual server, for display purposes.
|
/profile=full-ha/subsystem=web/virtual-server=default-host/:read-attribute(name=name) |
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) |