# VirtualHostMBean

Overview | Related MBeans | Attributes | Operations

## Overview

This bean represents the configuration of virtual web server within a WebLogic Server instance. Note that a server may define multiple web servers to support virtual hosts.

This MBean represents a virtual host.

Fully Qualified Interface Name | If you use the `getMBeanInfo` operation in MBeanTypeServiceMBean, supply the following value as this MBean's fully qualified interface name: `weblogic.management.configuration.VirtualHostMBean`
Factory Methods | Factory methods in DomainMBean
Additional Access Points | In addition to accessing this MBean by invoking a factory method, you can also access this MBean from the following MBean attributes:
WebDeploymentMBean.VirtualHosts |
Access Points Inherited from DeploymentMBean | Because this MBean extends or implements DeploymentMBean, you can also access this MBean by retrieving DeploymentMBeans. The following attributes contain DeploymentMBeans and its subtypes:
DomainMBean.Deployments |
Access Points Inherited from TargetMBean | Because this MBean extends or implements TargetMBean, you can also access this MBean by retrieving TargetMBeans. The following attributes contain TargetMBeans and its subtypes:
AppDeploymentMBean.Targets BasicDeploymentMBean.Targets CapacityMBean.Targets ClassDeploymentMBean.Targets ContextCaseMBean.Targets ContextRequestClassMBean.Targets CustomResourceMBean.Targets DeploymentMBean.Targets DomainLibraryMBean.Targets DomainMBean.Targets FairShareRequestClassMBean.Targets FileStoreMBean.Targets HTTPProxyMBean.Targets JDBCStoreMBean.Targets JDBCSystemResourceMBean.Targets JMSInteropModuleMBean.Targets JMSServerMBean.Targets JMSSystemResourceMBean.Targets JoltConnectionPoolMBean.Targets LibraryMBean.Targets MailSessionMBean.Targets MaxThreadsConstraintMBean.Targets | MessagingBridgeMBean.Targets MinThreadsConstraintMBean.Targets PathServiceMBean.Targets PersistentStoreMBean.Targets ResponseTimeRequestClassMBean.Targets RMCFactoryMBean.Targets SAFAgentMBean.Targets ShutdownClassMBean.Targets StartupClassMBean.Targets SubDeploymentMBean.Targets SystemResourceMBean.Targets TargetInfoMBean.Targets VirtualDestinationMBean.Targets VirtualHostMBean.Targets WebDeploymentMBean.Targets WebServerMBean.Targets WLDFSystemResourceMBean.Targets WLECConnectionPoolMBean.Targets WorkManagerMBean.Targets WTCServerMBean.Targets
Access Points Inherited from WebServerMBean | Because this MBean extends or implements WebServerMBean, you can also access this MBean by retrieving WebServerMBeans. The following attributes contain WebServerMBeans and its subtypes:
ServerMBean.WebServer WebDeploymentMBean.WebServers |
Deprecated Factory Methods and Access Points |
WebAppComponentMBean.VirtualHosts WebServiceComponentMBean.VirtualHosts |

## Related MBeans

This section describes attributes that provide access to other MBeans. For more information about the MBean hierarchy, refer to WebLogic Server MBean Data Model.

Targets WebServerLog |

### Targets

You must select a target on which an MBean will be deployed from this list of the targets in the current domain on which this item can be deployed. Targets must be either servers or clusters. The deployment will only occur once if deployments overlap.

Privileges | Read/Write
Type | TargetMBean[]
Relationship type: | Reference.

### WebServerLog

Returns the Log settings for the WebServer/VirtualHost.

Factory Methods | No explicit creator method. The child shares the lifecycle of its parent.
Privileges | Read only
Type | WebServerLogMBean
Relationship type: | Containment.

## Attributes

This section describes the following attributes:

AcceptContextPathInGetRealPath AuthCookieEnabled Charsets ChunkedTransferDisabled DefaultWebAppContextRoot DeploymentOrder FrontendHost FrontendHTTPPort FrontendHTTPSPort HttpsKeepAliveSecs KeepAliveEnabled KeepAliveSecs MaxPostSize MaxPostTimeSecs Name | NetworkAccessPoint Notes OverloadResponseCode Parent PostTimeoutSecs SendServerHeaderEnabled SingleSignonDisabled Type URLResource UseHeaderEncoding UseHighestCompatibleHTTPVersion VirtualHostNames WAPEnabled WriteChunkBytes

### AcceptContextPathInGetRealPath

Indicates whether this server allows the inclusion of the context path in the virtual path to `context.getRealPath()`. (If checked, you cannot use sub directories with the same name as `contextPath`). This is a compatibility switch that will be deprecated 9.0.0.0 in future releases.

Gets the acceptContextPathInGetRealPath attribute of the WebServerMBean object

Privileges | Read/Write
Type | boolean

### AuthCookieEnabled

Whether authcookie feature is enabled or not.

Privileges | Read/Write
Type | boolean
Default Value | true
Secure value | true

### Charsets

Provides user defined mapping between internet and Java charset names.

Privileges | Read/Write
Type | java.util.Map

### ChunkedTransferDisabled

Indicates whether the use of Chunk Transfer-Encoding in HTTP/1.1 is enabled.

Privileges | Read/Write
Type | boolean

### DefaultWebAppContextRoot

Returns the original context-root for the default Web application for this Web server. Alternatively, you can use the context-root attributes in application.xml or weblogic.xml to set a default Web application. The context-root for a default Web application is /. If "" (empty string) is specified, the Web server defaults to /.

Available Since | Release 9.0.0.0
Privileges | Read/Write
Type | java.lang.String

### DeploymentOrder

A priority that the server uses to determine when it deploys an item. The priority is relative to other deployable items of the same type.

For example, the server prioritizes and deploys all EJBs before it prioritizes and deploys startup classes.

Items with the lowest Deployment Order value are deployed first. There is no guarantee on the order of deployments with equal Deployment Order values. There is no guarantee of ordering across clusters.

Privileges | Read/Write
Type | int
Default Value | 1000
Minimum value | 0
Maximum value | 2147483647

### FrontendHost

The name of the host to which all redirected URLs will be sent. If specified, WebLogic Server will use this value rather than the one in the HOST header.

Sets the HTTP frontendHost Provides a method to ensure that the webapp will always have the correct HOST information, even when the request is coming through a firewall or a proxy. If this parameter is configured, the HOST header will be ignored and the information in this parameter will be used in its place.

Privileges | Read/Write
Type | java.lang.String

### FrontendHTTPPort

The name of the HTTP port to which all redirected URLs will be sent. If specified, WebLogic Server will use this value rather than the one in the HOST header.

Sets the frontendHTTPPort Provides a method to ensure that the webapp will always have the correct PORT information, even when the request is coming through a firewall or a proxy. If this parameter is configured, the HOST header will be ignored and the information in this parameter will be used in its place.

Privileges | Read/Write
Type | int
Default Value | 0

### FrontendHTTPSPort

The name of the secure HTTP port to which all redirected URLs will be sent. If specified, WebLogic Server will use this value rather than the one in the HOST header.

Sets the frontendHTTPSPort Provides a method to ensure that the webapp will always have the correct PORT information, even when the request is coming through a firewall or a proxy. If this parameter is configured, the HOST header will be ignored and the information in this parameter will be used in its place.

Privileges | Read/Write
Type | int
Default Value | 0

### HttpsKeepAliveSecs

The amount of time this server waits before closing an inactive HTTPS connection.

Number of seconds to maintain HTTPS keep-alive before timing out the request.

Privileges | Read/Write
Type | int
Default Value | 60
Minimum value | 30
Maximum value | 360
Secure value | 60

### KeepAliveEnabled

Indicates whether there should be a persistent connection to this server. (This may improve the performance of your Web applications.)

Gets the keepAliveEnabled attribute of the WebServerMBean object

Privileges | Read/Write
Type | boolean
Default Value | true
Secure value | true

### KeepAliveSecs

The amount of time this server waits before closing an inactive HTTP connection.

Number of seconds to maintain HTTP keep-alive before timing out the request.

Privileges | Read/Write
Type | int
Default Value | 30
Minimum value | 5
Maximum value | 300
Secure value | 30

### MaxPostSize

The maximum post size this server allows for reading HTTP POST data in a servlet request. A value less than 0 indicates an unlimited size.

Gets the maxPostSize attribute of the WebServerMBean object

For more information, see:

- WebAppContainerMBean#getMaxPostSize()

Privileges | Read/Write
Type | int
Default Value | -1

### MaxPostTimeSecs

Max Post Time (in seconds) for reading HTTP POST data in a servlet request. MaxPostTime < 0 means unlimited

Gets the maxPostTimeSecs attribute of the WebServerMBean object

For more information, see:

- WebAppContainerMBean#getMaxPostTimeSecs()

Privileges | Read/Write
Type | int
Default Value | -1

### Name

The user-specified name of this MBean instance.

This name is included as one of the key properties in the MBean's `javax.management.ObjectName`:
`Name=user-specified-name`

Privileges | Read/Write
Type | java.lang.String

### NetworkAccessPoint

The dedicated server channel name (NetworkAccessPoint) for which this virtual host will serve http request. If the NetworkAccessPoint for a given http request doesn't match any virtual host's NetworkAccessPoint, incoming HOST header will be matched with the VirtualHostNames in order to resolve the right virtual host.

Privileges | Read/Write
Type | java.lang.String

### Notes

Optional information that you can include to describe this configuration.

WebLogic Sever saves this note in the domain's configuration file (`config.xml`) as XML PCDATA. All left angle brackets (<) are converted to the XML entity `&lt;`. Carriage returns/line feeds are preserved.

Note:

  If you create or edit a note from the Administration Console, the Administration Console does not preserve carriage returns/line feeds.

Privileges | Read/Write
Type | java.lang.String

### OverloadResponseCode

Get the response code to be used when an application is overloaded. An application can get overloaded when the number of pending requests has reached the max capacity specified in the WorkManager or when the server is low on memory. The low memory condition is determined using OverloadProtectionMBean#getFreeMemoryPercentLowThreshold() .

For more information, see:

- CapacityMBean
- OverloadProtectionMBean

Privileges | Read/Write
Type | int
Default Value | 503
Minimum value | 100
Maximum value | 599

### Parent

Return the immediate parent for this MBean

Privileges | Read/Write
Type |

### PostTimeoutSecs

The amount of time this server waits between receiving chunks of data in an HTTP POST data before it times out. (This is used to prevent denial-of-service attacks that attempt to overload the server with POST data.)

Gets the postTimeoutSecs attribute of the WebServerMBean object

Privileges | Read/Write
Type | int
Default Value | 30
Minimum value | 0
Maximum value | 120
Secure value | 30

### SendServerHeaderEnabled

Indicates whether this server name is sent with the HTTP response. (This is useful for wireless applications where there is limited space for headers.)

Indicates whether this server instance includes its name and WebLogic Server version number in HTTP response headers.

Privileges | Read/Write
Type | boolean

### SingleSignonDisabled

Indicates whether the singleSignonDisabled attribute is enabled

Privileges | Read/Write
Type | boolean

### Type

Returns the type of the MBean.

Privileges | Read only
Type | java.lang.String
Redeploy or Restart required | Changes take effect after you redeploy the module or restart the server.

### URLResource

Adds a URL connection factory resource into JNDI.

Privileges | Read/Write
Type | java.util.Map

### UseHeaderEncoding

Privileges | Read/Write
Type | boolean

### UseHighestCompatibleHTTPVersion

Enables use of the highest compatible HTTP protocol version-string in the response. E.g. HTTP spec suggests that HTTP/1.1 version-string should be used in response to a request using HTTP/1.0. This does not necessarily affect the response format.

Privileges | Read/Write
Type | boolean
Default Value | true

### VirtualHostNames

The comma-separated list of host names for which this virtual host will serve requests.

Privileges | Read/Write
Type | class java.lang.String[]

### WAPEnabled

Indicates whether the session ID should include JVM information. (Checking this box may be necessary when using URL rewriting with WAP devices that limit the size of the URL to 128 characters, and may also affect the use of replicated sessions in a cluster.) When this box is selected, the default size of the URL will be set at 52 characters, and it will not contain any special characters.

Gets the WAPEnabled attribute of the WebServerMBean object

For more information, see:

- WebAppContainerMBean#isWAPEnabled()

Privileges | Read/Write
Type | boolean

### WriteChunkBytes

The default size of the blocks to be written to the network layer.

Gets the writeChunkBytes attribute of the WebServerMBean object

Privileges | Read only
Type | int
Default Value | 512

## Operations

This section describes the following operations:

addTarget freezeCurrentValue isSet removeTarget | restoreDefaultValue unSet

### addTarget

You can add a target to specify additional servers on which the deployment can be deployed. The targets must be either clusters or servers.

Operation Name | `"addTarget"`
Parameters | `Object [] { target }` where: `target` is an object of type `weblogic.management.configuration.TargetMBean` that specifies: The feature to be added to the Target attribute
Signature | `String [] { "weblogic.management.configuration.TargetMBean" }`
Returns | `boolean`
Exceptions | `javax.management.InvalidAttributeValueException` `weblogic.management.DistributedManagementException`

### freezeCurrentValue

If the specified attribute has not been set explicitly, and if the attribute has a default value, this operation forces the MBean to persist the default value.

Unless you use this operation, the default value is not saved and is subject to change if you update to a newer release of WebLogic Server. Invoking this operation isolates this MBean from the effects of such changes.

Note:

  To insure that you are freezing the default value, invoke the `restoreDefaultValue` operation before you invoke this.

This operation has no effect if you invoke it on an attribute that does not provide a default value or on an attribute for which some other value has been set.

Deprecated. 9.0.0.0

Operation Name | `"freezeCurrentValue"`
Parameters | `Object [] { attributeName }` where: `attributeName` is an object of type `java.lang.String` that specifies: attributeName
Signature | `String [] { "java.lang.String" }`
Returns | `void`
Exceptions | `javax.management.AttributeNotFoundException` `javax.management.MBeanException`

### isSet

Returns true if the specified attribute has been set explicitly in this MBean instance.

Operation Name | `"isSet"`
Parameters | `Object [] { propertyName }` where: `propertyName` is an object of type `java.lang.String` that specifies: property to check
Signature | `String [] { "java.lang.String" }`
Returns | `boolean`

### removeTarget

Removes the value of the addTarget attribute.

For more information, see:

- addTarget

Operation Name | `"removeTarget"`
Parameters | `Object [] { target }` where: `target` is an object of type `weblogic.management.configuration.TargetMBean` that specifies: target
Signature | `String [] { "weblogic.management.configuration.TargetMBean" }`
Returns | `boolean`
Exceptions | `javax.management.InvalidAttributeValueException` `weblogic.management.DistributedManagementException`

### restoreDefaultValue

If the specified attribute has a default value, this operation removes any value that has been set explicitly and causes the attribute to use the default value.

Default values are subject to change if you update to a newer release of WebLogic Server. To prevent the value from changing if you update to a newer release, invoke the `freezeCurrentValue` operation.

This operation has no effect if you invoke it on an attribute that does not provide a default value or on an attribute that is already using the default.

Deprecated. 9.0.0.0

Operation Name | `"restoreDefaultValue"`
Parameters | `Object [] { attributeName }` where: `attributeName` is an object of type `java.lang.String` that specifies: attributeName
Signature | `String [] { "java.lang.String" }`
Returns | `void`
Exceptions | `javax.management.AttributeNotFoundException`

### unSet

Restore the given property to its default value.

Operation Name | `"unSet"`
Parameters | `Object [] { propertyName }` where: `propertyName` is an object of type `java.lang.String` that specifies: property to restore
Signature | `String [] { "java.lang.String" }`
Returns | `void`