package com.sun.enterprise.web;
Standard implementation of a virtual server (aka virtual host) in
the iPlanet Application Server.
The logger to use for logging this virtual server
The resource bundle containing the message strings for _logger.
message = "The web module {0} has been designated as the default-web-module for virtual server {1}",
message = "Error looking up the configuration information of the default-web-module {0} for virtual server {1}",
cause = "The web module specified is either not found or disabled or does not specify this virtual server, " +
"or there was an error loading its deployment descriptors",
action = "Verify if the virtual server's default web module is valid")
message = "The default-web-module {0} is either disabled or does not specify virtual server {1}",
cause = "The default web module is disabled or does not specify virtual server",
action = "Verify if the default web module is enabled and specify virtual server")
message = "Virtual server {0} has invalid authentication realm {1}",
cause = "The realm {1} could not be found",
action = "Verify if the realm {1} exits for virtual server {0}")
message = "Invalid sso-cookie-secure configuration {0} for virtual server {1}",
message = "Realm {0} is not an instance of {1}, and will be ignored",
cause = "The realm {0} is either NULL or is not an instance of {1}",
action = "Verify if the realm {0} is an instance of {1}")
message = "Virtual server {0} has a property with missing name or value",
message = "Invalid redirect property value {0} for virtual server {1}: More than one {2} component",
message = "Invalid redirect property value {0} for virtual server {1}: Missing url or url-prefix component",
message = "Invalid redirect property value {0} for virtual server {1}: Both url and url-prefix specified",
message = "Invalid redirect property value {0} for virtual server {1}: escape must be equal to yes or no",
message = "Invalid send-error property value {0} for virtual server {1}: More than one {2} component",
message = "Invalid send-error property value {0} for virtual server {1}: Missing path component",
message = "Unable to add listener of type {0} to virtual server {1}",
cause = "The listener is not an instance of ContainerListener or LifecycleListener",
action = "Verify if the listener type is supported")
message = " Unable to load extension class {0} from web module {1}",
cause = "An exception occurred loading extension class",
action = "Check the exception for the error")
message = "Object of type classname {0} not an instance of Valve or GlassFishValve",
message = "Error adding HttpProbes. NetworkListener {0}'s HttpCodecFilter is {1}",
cause = "HttpCodecFilter is either NULL or empty",
action = "Verify the NetworkListener is valid")
message = "Error adding HttpProbes",
cause = "An exception occurred adding HttpProbes",
action = "Check the exception for the error")
message = "Disabling Single Sign On (SSO) for virtual server {0} as configured",
message = "Enabling Single Sign On (SSO) for virtual server {0} as configured",
message = "SSO entry max idle time set to {0} for virtual server {1}",
message = "SSO expire thread interval set to {0} for virtual server {1}",
message = "Allowing access to {0} from {1}",
message = "Denying access to {0} from {1}",
message = "Virtual server {0} enabled context {1}",
message = "Unable to delete {0}",
message = "Unable to reconfigure access log valve",
cause = "An exception occurred during access log valve reconfiguration",
action = "Check the exception for error")
message = "Virtual server {0} added context {1}",
message = "Application {0} is not found",
cause = "The deployed application is not found",
action = "Check if the application is valid")
message = "Cannot create context for undeployment",
cause = "An IOException occurred during undeployment",
action = "Check the exception for error")
message = "Successfully removed context {0}",
message = "Modifying web.xml {0}",
message = "Error adding HttpProbes. NetworkListener {0}'s GrizzlyProxy is NULL",
cause = "GrizzlyProxy is NULL",
action = "Verify the NetworkListener is valid")
Default constructor that simply gets a handle to the web container
subsystem's logger.
The id of this virtual server as specified in the configuration.
The logger to use for logging this virtual server
The descriptive information about this implementation.
"com.sun.enterprise.web.VirtualServer/1.0";
The config bean associated with this VirtualServer
The mime mapping associated with this VirtualServer
Return the virtual server identifier.
Set the virtual server identifier string.
- Parameters:
id
New identifier for this virtual server
Sets the state of this virtual server.
- Parameters:
isActive
true if this virtual server is active, false otherwise
Gets the value of the allowLinking property of this virtual server.
- Returns:
- true if symbolic links from this virtual server's docroot (as
well as symbolic links from archives of web modules deployed on this
virtual server) are followed, false otherwise
Sets the allowLinking property of this virtual server, which determines
whether symblic links from this virtual server's docroot are followed.
This property is inherited by all web modules deployed on this virtual
server, unless overridden by the allowLinking property in a web module's
sun-web.xml.
- Parameters:
allowLinking
Value of allowLinking property
Gets the config bean associated with this VirtualServer.
Sets the config bean for this VirtualServer
Gets the mime map associated with this VirtualServer.
Sets the mime map for this VirtualServer
Gets the Cache-Control configuration of this VirtualServer.
- Returns:
- Cache-Control configuration of this VirtualServer, or null if
no such configuration exists for this VirtualServer
Sets the Cache-Control configuration for this VirtualServer
- Parameters:
cacheControls
Cache-Control configuration settings for this
VirtualServer
Configures the Secure attribute of the given SSO cookie.
- Parameters:
ssoCookie
the SSO cookie to be configuredhreq
the HttpServletRequest that has initiated the SSO session
Adds the given valve to the currently active pipeline, keeping the
pipeline that is not currently active in sync.
Adds the given Tomcat-style valve to the currently active pipeline,
keeping the pipeline that is not currently active in sync.
Removes the given valve from the currently active pipeline, keeping the
valve that is not currently active in sync.
Gets the context root of the web module that the user/configuration
has designated as the default-web-module for this virtual server.
The default-web-module for a virtual server is specified via the
'default-web-module' attribute of the 'virtual-server' element in
server.xml. This is an optional attribute and if the configuration
does not specify another web module (standalone or part of a
j2ee-application) that is configured at a context-root="", then
a default web module will be created and loaded. The value for this
attribute is either "${standalone-web-module-name}" or
"${j2ee-app-name}:${web-module-uri}".
- Returns:
- null if the default-web-module has not been specified or
if the web module specified either could not be found or
is disabled or does not specify this virtual server (if
it specifies a value for the virtual-servers attribute) or
if there was an error loading its deployment descriptors.
if (contextRoot == null) {
if (contextRoot!=null && location != null) {
If a default web module has not yet been configured and added to this
virtual server's list of web modules then return the configuration
information needed in order to create a default web module for this
virtual server.
This method should be invoked only after all the standalone modules
and the modules within j2ee-application elements have been added to
this virtual server's list of modules (only then will one know whether
the user has already configured a default web module or not).
Returns the id of the default web module for this virtual server
as specified in the 'default-web-module' attribute of the
'virtual-server' element.
Finds and returns information about a web module embedded within a
J2EE application, which is identified by a string of the form
a:b
or
a#b
, where
a
is the name
of the J2EE application and
b
is the name of the embedded
web module.
- Returns:
- null if
id
does not identify a web module embedded
within a J2EE application.
if (separatorIndex == -1) {
if (separatorIndex != -1) {
if (moduleID.equals(webUri)) {
Virtual servers are maintained in the reference contained
in Server element. First, we need to find the server
and then get the virtual server from the correct reference
- Parameters:
appName
Name of the app to get vs- Returns:
- virtual servers as a string (separated by space or comma)
private String getVirtualServers(String appName) {
String ret = null;
Server server = Globals.getDefaultHabitat().forContract(Server.class).get();
for (ApplicationRef appRef : server.getApplicationRef()) {
if (appRef.getRef().equals(appName)) {
return appRef.getVirtualServers();
}
}
return ret;
}
- Returns:
- The properties of this virtual server
Configures this virtual server.
defaultWebXmlLocation = prop.getValue();
boolean allowLinking = false;
defaultContextXmlLocation = prop.getValue();
Configures the valve_ and listener_ properties of this VirtualServer.
if (propName == null || propValue == null) {
} else if (propName.equals("securePagesWithPragma")){
catalina file logger code
String logPrefix = logFile;
String logDir = null;
String logSuffix = null;
if (logPrefix == null || logPrefix.equals("")) {
return;
}
int index = logPrefix.lastIndexOf(File.separatorChar);
if (index != -1) {
logDir = logPrefix.substring(0, index);
logPrefix = logPrefix.substring(index+1);
}
index = logPrefix.indexOf('.');
if (index != -1) {
logSuffix = logPrefix.substring(index);
logPrefix = logPrefix.substring(0, index);
}
logPrefix += "_";
FileLogger contextLogger = new FileLogger();
if (logDir != null) {
contextLogger.setDirectory(logDir);
}
contextLogger.setPrefix(logPrefix);
if (logSuffix != null) {
contextLogger.setSuffix(logSuffix);
}
contextLogger.setTimestamp(true);
contextLogger.setLevel(logLevel);
(logFile == null || logFile.equals(logServiceFile));
if (oldHandler != null) {
newLogger = new Logger(lname, null) {
boolean hasHandler = false;
if (rootLogger != null) {
if (rootHandlers != null) {
Adds each host name from the 'hosts' attribute as an alias