📄 standardcontext.java
字号:
private boolean replaceWelcomeFiles = false;
/**
* The security role mappings for this application, keyed by role
* name (as used within the application).
*/
private HashMap roleMappings = new HashMap();
/**
* The security roles for this application, keyed by role name.
*/
private String securityRoles[] = new String[0];
/**
* The servlet mappings for this web application, keyed by
* matching pattern.
*/
private HashMap servletMappings = new HashMap();
/**
* The session timeout (in minutes) for this web application.
*/
private int sessionTimeout = 30;
/**
* The notification sequence number.
*/
private long sequenceNumber = 0;
/**
* The status code error pages for this web application, keyed by
* HTTP status code (as an Integer).
*/
private HashMap statusPages = new HashMap();
/**
* Set flag to true to cause the system.out and system.err to be redirected
* to the logger when executing a servlet.
*/
private boolean swallowOutput = false;
/**
* The JSP tag libraries for this web application, keyed by URI
*/
private HashMap taglibs = new HashMap();
/**
* The welcome files for this application.
*/
private String welcomeFiles[] = new String[0];
/**
* The set of classnames of LifecycleListeners that will be added
* to each newly created Wrapper by <code>createWrapper()</code>.
*/
private String wrapperLifecycles[] = new String[0];
/**
* The set of classnames of ContainerListeners that will be added
* to each newly created Wrapper by <code>createWrapper()</code>.
*/
private String wrapperListeners[] = new String[0];
/**
* The pathname to the work directory for this context (relative to
* the server's home if not absolute).
*/
private String workDir = null;
/**
* Java class name of the Wrapper class implementation we use.
*/
private String wrapperClass = "org.apache.catalina.core.StandardWrapper";
/**
* JNDI use flag.
*/
private boolean useNaming = true;
/**
* Filesystem based flag.
*/
private boolean filesystemBased = false;
/**
* Name of the associated naming context.
*/
private String namingContextName = null;
/**
* Frequency of the session expiration, and related manager operations.
* Manager operations will be done once for the specified amount of
* backgrondProcess calls (ie, the lower the amount, the most often the
* checks will occur).
*/
private int managerChecksFrequency = 6;
/**
* Iteration count for background processing.
*/
private int count = 0;
/**
* Caching allowed flag.
*/
private boolean cachingAllowed = true;
/**
* Case sensitivity.
*/
protected boolean caseSensitive = true;
/**
* Allow linking.
*/
protected boolean allowLinking = false;
/**
* Cache max size in KB.
*/
protected int cacheMaxSize = 10240; // 10 MB
/**
* Cache TTL in ms.
*/
protected int cacheTTL = 5000;
private boolean lazy=true;
/**
* Non proxied resources.
*/
private transient DirContext webappResources = null;
private ArrayList wrappers=new ArrayList();
private long startupTime;
private long startTime;
private long tldScanTime;
/** Name of the engine. If null, the domain is used.
*/
private String engineName = null;
private String j2EEApplication="none";
private String j2EEServer="none";
// ----------------------------------------------------- Context Properties
public void setName( String name ) {
super.setName( name );
}
/**
* Is caching allowed ?
*/
public boolean isCachingAllowed() {
return cachingAllowed;
}
/**
* Set caching allowed flag.
*/
public void setCachingAllowed(boolean cachingAllowed) {
this.cachingAllowed = cachingAllowed;
}
/**
* Set case sensitivity.
*/
public void setCaseSensitive(boolean caseSensitive) {
this.caseSensitive = caseSensitive;
}
/**
* Is case sensitive ?
*/
public boolean isCaseSensitive() {
return caseSensitive;
}
/**
* Set allow linking.
*/
public void setAllowLinking(boolean allowLinking) {
this.allowLinking = allowLinking;
}
/**
* Is linking allowed.
*/
public boolean isAllowLinking() {
return allowLinking;
}
/**
* Set cache TTL.
*/
public void setCacheTTL(int cacheTTL) {
this.cacheTTL = cacheTTL;
}
/**
* Get cache TTL.
*/
public int getCacheTTL() {
return cacheTTL;
}
/**
* Return the maximum size of the cache in KB.
*/
public int getCacheMaxSize() {
return cacheMaxSize;
}
/**
* Set the maximum size of the cache in KB.
*/
public void setCacheMaxSize(int cacheMaxSize) {
this.cacheMaxSize = cacheMaxSize;
}
/**
* Return the "follow standard delegation model" flag used to configure
* our ClassLoader.
*/
public boolean getDelegate() {
return (this.delegate);
}
/**
* Set the "follow standard delegation model" flag used to configure
* our ClassLoader.
*
* @param delegate The new flag
*/
public void setDelegate(boolean delegate) {
boolean oldDelegate = this.delegate;
this.delegate = delegate;
support.firePropertyChange("delegate", new Boolean(oldDelegate),
new Boolean(this.delegate));
}
/**
* Returns true if the internal naming support is used.
*/
public boolean isUseNaming() {
return (useNaming);
}
/**
* Enables or disables naming.
*/
public void setUseNaming(boolean useNaming) {
this.useNaming = useNaming;
}
/**
* Returns true if the resources associated with this context are
* filesystem based.
*/
public boolean isFilesystemBased() {
return (filesystemBased);
}
/**
* Return the set of initialized application event listener objects,
* in the order they were specified in the web application deployment
* descriptor, for this application.
*
* @exception IllegalStateException if this method is called before
* this application has started, or after it has been stopped
*/
public Object[] getApplicationEventListeners() {
return (applicationEventListenersObjects);
}
/**
* Store the set of initialized application event listener objects,
* in the order they were specified in the web application deployment
* descriptor, for this application.
*
* @param listeners The set of instantiated listener objects.
*/
public void setApplicationEventListeners(Object listeners[]) {
applicationEventListenersObjects = listeners;
}
/**
* Return the set of initialized application lifecycle listener objects,
* in the order they were specified in the web application deployment
* descriptor, for this application.
*
* @exception IllegalStateException if this method is called before
* this application has started, or after it has been stopped
*/
public Object[] getApplicationLifecycleListeners() {
return (applicationLifecycleListenersObjects);
}
/**
* Store the set of initialized application lifecycle listener objects,
* in the order they were specified in the web application deployment
* descriptor, for this application.
*
* @param listeners The set of instantiated listener objects.
*/
public void setApplicationLifecycleListeners(Object listeners[]) {
applicationLifecycleListenersObjects = listeners;
}
/**
* Return the application available flag for this Context.
*/
public boolean getAvailable() {
return (this.available);
}
/**
* Set the application available flag for this Context.
*
* @param available The new application available flag
*/
public void setAvailable(boolean available) {
boolean oldAvailable = this.available;
this.available = available;
support.firePropertyChange("available",
new Boolean(oldAvailable),
new Boolean(this.available));
}
/**
* Return the Locale to character set mapper for this Context.
*/
public CharsetMapper getCharsetMapper() {
// Create a mapper the first time it is requested
if (this.charsetMapper == null) {
try {
Class clazz = Class.forName(charsetMapperClass);
this.charsetMapper =
(CharsetMapper) clazz.newInstance();
} catch (Throwable t) {
this.charsetMapper = new CharsetMapper();
}
}
return (this.charsetMapper);
}
/**
* Set the Locale to character set mapper for this Context.
*
* @param mapper The new mapper
*/
public void setCharsetMapper(CharsetMapper mapper) {
CharsetMapper oldCharsetMapper = this.charsetMapper;
this.charsetMapper = mapper;
if( mapper != null )
this.charsetMapperClass= mapper.getClass().getName();
support.firePropertyChange("charsetMapper", oldCharsetMapper,
this.charsetMapper);
}
/**
* Return the path to a file to save this Context information.
*/
public String getConfigFile() {
return (this.configFile);
}
/**
* Set the path to a file to save this Context information.
*
* @param configFile The path to a file to save this Context information.
*/
public void setConfigFile(String configFile) {
this.configFile = configFile;
}
/**
* Return the "correctly configured" flag for this Context.
*/
public boolean getConfigured() {
return (this.configured);
}
/**
* Set the "correctly configured" flag for this Context. This can be
* set to false by startup listeners that detect a fatal configuration
* error to avoid the application from being made available.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -