|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opencms.main.CmsServletContainerSettings
public class CmsServletContainerSettings
Stores specific servlet container options, that might influence OpenCms behavior.
Nested Class Summary | |
---|---|
static class |
CmsServletContainerSettings.CmsServletContainerCfgMode
Enumeration class for the configuration mode. |
Field Summary | |
---|---|
static CmsServletContainerSettings.CmsServletContainerCfgMode |
CFG_MODE_AUTO
String remote command execution return type. |
static CmsServletContainerSettings.CmsServletContainerCfgMode |
CFG_MODE_MANUAL
Map remote command execution return type. |
static CmsServletContainerSettings.CmsServletContainerCfgMode |
CFG_MODE_NONE
List remote command execution return type. |
Constructor Summary | |
---|---|
|
CmsServletContainerSettings(javax.servlet.ServletContext context)
Creates a new object. |
protected |
CmsServletContainerSettings(java.lang.String webInfRfsPath,
java.lang.String defaultWebApplication,
java.lang.String servletMapping,
java.lang.String servletContainerName,
java.lang.String webApplicationContext)
Creates an instance based on the given values. |
Method Summary | |
---|---|
java.lang.String |
getContextPath()
Returns the web application context path, e.g. "" (empty String) if the web application is the default web application (usually "ROOT"), or "/opencms" if the web application is called "opencms". |
java.lang.String |
getDefaultWebApplicationName()
Returns the default web application name (usually "ROOT"). |
CmsServletContainerSettings.CmsServletContainerCfgMode |
getMode()
Returns the mode. |
java.lang.String |
getOpenCmsContext()
Returns the OpenCms request context, e.g. |
java.lang.String |
getRequestErrorPageAttribute()
Returns the request error page attribute. |
java.lang.String |
getServletContainerName()
Returns the name of the servlet container running OpenCms. |
java.lang.String |
getServletPath()
Returns the OpenCms servlet path, e.g. |
java.lang.String |
getWebApplicationName()
Returns the OpenCms web application name, e.g. |
java.lang.String |
getWebApplicationRfsPath()
Returns the OpenCms web application folder in the servlet container. |
java.lang.String |
getWebInfRfsPath()
Returns the OpenCms web application "WEB-INF" directory path. |
boolean |
isPreventResponseFlush()
Checks if the flex response has to prevent buffer flushing. |
boolean |
isReleaseTagsAfterEnd()
Checks if the tags need to be released after ending. |
static boolean |
isServletThrowsException()
Checks if the servlet can throw an exception if initialization fails. |
void |
setMode(java.lang.String configValue)
Sets the mode from the configuration. |
void |
setPreventResponseFlush(boolean preventResponseFlush)
Sets if the flex response has to prevent buffer flushing. |
void |
setReleaseTagsAfterEnd(boolean releaseTagsAfterEnd)
Sets if the tags need to be released after ending. |
void |
setRequestErrorPageAttribute(java.lang.String requestErrorPageAttribute)
Sets the request error page attribute. |
void |
setServletThrowsException(boolean servletThrowsException)
Sets if the servlet can throw an exception if initialization fails. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final CmsServletContainerSettings.CmsServletContainerCfgMode CFG_MODE_AUTO
public static final CmsServletContainerSettings.CmsServletContainerCfgMode CFG_MODE_MANUAL
public static final CmsServletContainerSettings.CmsServletContainerCfgMode CFG_MODE_NONE
Constructor Detail |
---|
public CmsServletContainerSettings(javax.servlet.ServletContext context)
context
- used to find out specifics of the servlet containerprotected CmsServletContainerSettings(java.lang.String webInfRfsPath, java.lang.String defaultWebApplication, java.lang.String servletMapping, java.lang.String servletContainerName, java.lang.String webApplicationContext)
This is intended for
access.CmsShell
webInfRfsPath
- the OpenCms web application "WEB-INF" path in the "real" file system) to setservletMapping
- the OpenCms servlet mapping (e.g. "/opencms/*")webApplicationContext
- the name/path of the OpenCms web application context (optional, will be calculated form the path if null)defaultWebApplication
- the default web application name (usually "ROOT")servletContainerName
- the name of the servlet container running OpenCmsMethod Detail |
---|
public static boolean isServletThrowsException()
true
if the servlet can throw an exception if initialization failspublic java.lang.String getContextPath()
From the Java Servlet Specification v2.4:
Context Path: The path prefix associated with the ServletContext that this
servlet is a part of. If this context is the "default" context rooted at the base of
the web server's URL name space, this path will be an empty string. Otherwise,
if the context is not rooted at the root of the server's name space, the path starts
with a "/" character but does not end with a "/" character.
getWebApplicationName()
,
getServletPath()
,
getOpenCmsContext()
public java.lang.String getDefaultWebApplicationName()
public CmsServletContainerSettings.CmsServletContainerCfgMode getMode()
public java.lang.String getOpenCmsContext()
The OpenCms context will always start with a "/" and never have a trailing "/".
The OpenCms context is identical to getContexPath() + getServletPath()
.
getContextPath()
,
getServletPath()
public java.lang.String getRequestErrorPageAttribute()
public java.lang.String getServletContainerName()
public java.lang.String getServletPath()
From the Java Servlet Specification v2.4:
Servlet Path: The path section that directly corresponds to the mapping
which activated this request. This path starts with a?/? character except in the
case where the request is matched with the ?/*? pattern, in which case it is the
empty string.
getContextPath()
,
getWebApplicationName()
,
getOpenCmsContext()
public java.lang.String getWebApplicationName()
The web application name is stored for informational purposes only.
If you want to construct an URI, use either getContextPath()
and
getServletPath()
, or for links to the OpenCms VFS use getOpenCmsContext()
.
getContextPath()
,
getServletPath()
,
getOpenCmsContext()
public java.lang.String getWebApplicationRfsPath()
public java.lang.String getWebInfRfsPath()
public boolean isPreventResponseFlush()
true
if the flex response has to prevent buffer flushingpublic boolean isReleaseTagsAfterEnd()
true
if the tags need to be released after endingpublic void setMode(java.lang.String configValue)
configValue
- the mode to setpublic void setPreventResponseFlush(boolean preventResponseFlush)
preventResponseFlush
- the flag to setpublic void setReleaseTagsAfterEnd(boolean releaseTagsAfterEnd)
releaseTagsAfterEnd
- the flag to setpublic void setRequestErrorPageAttribute(java.lang.String requestErrorPageAttribute)
requestErrorPageAttribute
- the request error page attribute to setpublic void setServletThrowsException(boolean servletThrowsException)
servletThrowsException
- the flag to set
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |