Class CmsServletContainerSettings
- Since:
- 7.0.5
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Enumeration class for the configuration mode. -
Field Summary
Modifier and TypeFieldDescriptionString remote command execution return type.Map remote command execution return type.List remote command execution return type. -
Constructor Summary
ModifierConstructorDescriptionprotected
CmsServletContainerSettings
(String webInfRfsPath, String defaultWebApplication, String servletMapping, String servletContainerName, String webApplicationContext) Creates an instance based on the given values.CmsServletContainerSettings
(javax.servlet.ServletContext context) Creates a new object. -
Method Summary
Modifier and TypeMethodDescriptionReturns the web application context path, e.g.Returns the default web application name (usually "ROOT").getMode()
Returns the mode.Returns the OpenCms request context, e.g.Returns the request error page attribute.Returns the name of the servlet container running OpenCms.Returns the OpenCms servlet path, e.g.Returns the OpenCms web application name, e.g.Returns the OpenCms web application folder in the servlet container.Returns the OpenCms web application "WEB-INF" directory path.boolean
Checks if the flex response has to prevent buffer flushing.boolean
Checks if the tags need to be released after ending.static boolean
Checks if the servlet can throw an exception if initialization fails.void
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
(String requestErrorPageAttribute) Sets the request error page attribute.void
setServletThrowsException
(boolean servletThrowsException) Sets if the servlet can throw an exception if initialization fails.
-
Field Details
-
CFG_MODE_AUTO
String remote command execution return type. -
CFG_MODE_MANUAL
Map remote command execution return type. -
CFG_MODE_NONE
List remote command execution return type.
-
-
Constructor Details
-
CmsServletContainerSettings
Creates a new object.- Parameters:
context
- used to find out specifics of the servlet container
-
CmsServletContainerSettings
protected CmsServletContainerSettings(String webInfRfsPath, String defaultWebApplication, String servletMapping, String servletContainerName, String webApplicationContext) Creates an instance based on the given values.This is intended for
access.CmsShell
- Parameters:
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 OpenCms
-
-
Method Details
-
isServletThrowsException
Checks if the servlet can throw an exception if initialization fails.- Returns:
true
if the servlet can throw an exception if initialization fails
-
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".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.- Returns:
- the web application context path
- See Also:
-
getDefaultWebApplicationName
Returns the default web application name (usually "ROOT").- Returns:
- the default web application name
-
getMode
Returns the mode.- Returns:
- the mode
-
getOpenCmsContext
Returns the OpenCms request context, e.g. "/opencms/opencms".The OpenCms context will always start with a "/" and never have a trailing "/". The OpenCms context is identical to
getContexPath() + getServletPath()
.- Returns:
- the OpenCms request context, e.g. "/opencms/opencms"
- See Also:
-
getRequestErrorPageAttribute
Returns the request error page attribute.- Returns:
- the request error page attribute
-
getServletContainerName
Returns the name of the servlet container running OpenCms.- Returns:
- the name of the servlet container running OpenCms
-
getServletPath
Returns the OpenCms servlet path, e.g. "/opencms".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.- Returns:
- the OpenCms servlet path
- See Also:
-
getWebApplicationName
Returns the OpenCms web application name, e.g. "opencms" or "ROOT" (no leading or trailing "/").The web application name is stored for informational purposes only. If you want to construct an URI, use either
getContextPath()
andgetServletPath()
, or for links to the OpenCms VFS usegetOpenCmsContext()
.- Returns:
- the OpenCms web application name
- See Also:
-
getWebApplicationRfsPath
Returns the OpenCms web application folder in the servlet container.- Returns:
- the OpenCms web application folder in the servlet container
-
getWebInfRfsPath
Returns the OpenCms web application "WEB-INF" directory path.- Returns:
- the OpenCms web application "WEB-INF" directory path
-
isPreventResponseFlush
Checks if the flex response has to prevent buffer flushing.- Returns:
true
if the flex response has to prevent buffer flushing
-
isReleaseTagsAfterEnd
Checks if the tags need to be released after ending.- Returns:
true
if the tags need to be released after ending
-
setMode
Sets the mode from the configuration.- Parameters:
configValue
- the mode to set
-
setPreventResponseFlush
Sets if the flex response has to prevent buffer flushing.- Parameters:
preventResponseFlush
- the flag to set
-
setReleaseTagsAfterEnd
Sets if the tags need to be released after ending.- Parameters:
releaseTagsAfterEnd
- the flag to set
-
setRequestErrorPageAttribute
Sets the request error page attribute.- Parameters:
requestErrorPageAttribute
- the request error page attribute to set
-
setServletThrowsException
Sets if the servlet can throw an exception if initialization fails.- Parameters:
servletThrowsException
- the flag to set
-