/** * 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".<p> * * <i>From the Java Servlet Specification v2.4:</i><br> * <b>Context Path:</b> 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.<p> * * @return the web application context path * @see #getWebApplicationName() * @see #getServletPath() * @see #getOpenCmsContext() */ public String getContextPath() { return m_servletContainerSettings.getContextPath(); }
/** * Returns the default web application name (usually "ROOT").<p> * * @return the default web application name */ public String getDefaultWebApplicationName() { return m_servletContainerSettings.getDefaultWebApplicationName(); }
/** * Returns the OpenCms request context, e.g. "/opencms/opencms".<p> * * The OpenCms context will always start with a "/" and never have a trailing "/". * The OpenCms context is identical to <code>getContexPath() + getServletPath()</code>.<p> * * @return the OpenCms request context, e.g. "/opencms/opencms" * @see #getContextPath() * @see #getServletPath() */ public String getOpenCmsContext() { return m_servletContainerSettings.getOpenCmsContext(); }
if (!servletContainerSettings.getMode().isNone()) { Element servletContainerSettingsElem = systemElement.addElement(N_SERVLETCONTAINERSETTINGS); servletContainerSettingsElem.addAttribute(A_MODE, servletContainerSettings.getMode().getMode()); if (!servletContainerSettings.getMode().isAuto()) { servletContainerSettingsElem.addElement(N_PREVENTRESPONSEFLUSH).addText( "" + servletContainerSettings.isPreventResponseFlush()); servletContainerSettingsElem.addElement(N_RELEASETAGSAFTEREND).addText( "" + servletContainerSettings.isReleaseTagsAfterEnd()); if (servletContainerSettings.getRequestErrorPageAttribute() != null) { servletContainerSettingsElem.addElement(N_REQUESTERRORPAGEATTRIBUTE).addText( servletContainerSettings.getRequestErrorPageAttribute());
CmsServletContainerSettings servletContainerSettings = new CmsServletContainerSettings(context); getSystemInfo().init(servletContainerSettings); getSystemInfo().getServletContainerSettings().setServletThrowsException(throwExc);
/** * Creates a new system info container.<p> */ public CmsSystemInfo() { // set startup time m_startupTime = System.currentTimeMillis(); // init version information initVersion(); // set default encoding (will be changed again later when properties have been read) m_defaultEncoding = DEFAULT_ENCODING.intern(); // this may look odd, but initMembers in OpenCms core has to initialize this (e.g. for setup to avoid NPE) m_servletContainerSettings = new CmsServletContainerSettings(null); }
/** * Returns the OpenCms web application "WEB-INF" directory path.<p> * * @return the OpenCms web application "WEB-INF" directory path */ public String getWebInfRfsPath() { return m_servletContainerSettings.getWebInfRfsPath(); }
/** * Returns the OpenCms web application folder in the servlet container.<p> * * @return the OpenCms web application folder in the servlet container */ public String getWebApplicationRfsPath() { return m_servletContainerSettings.getWebApplicationRfsPath(); }
/** * Returns the OpenCms web application name, e.g. "opencms" or "ROOT" (no leading or trailing "/").<p> * * The web application name is stored for informational purposes only. * If you want to construct an URI, use either {@link #getContextPath()} and * {@link #getServletPath()}, or for links to the OpenCms VFS use {@link #getOpenCmsContext()}.<p> * * @return the OpenCms web application name * @see #getContextPath() * @see #getServletPath() * @see #getOpenCmsContext() */ public String getWebApplicationName() { return m_servletContainerSettings.getWebApplicationName(); }
/** * Returns the OpenCms servlet path, e.g. "/opencms".<p> * * <i>From the Java Servlet Specification v2.4:</i><br> * <b>Servlet Path:</b> 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.<p> * * @return the OpenCms servlet path * @see #getContextPath() * @see #getWebApplicationName() * @see #getOpenCmsContext() */ public String getServletPath() { return m_servletContainerSettings.getServletPath(); }
if (path == null) { String requestErrorPageAttribute = getSystemInfo().getServletContainerSettings().getRequestErrorPageAttribute(); if (requestErrorPageAttribute != null) {
if (!servletContainerSettings.getMode().isNone()) { Element servletContainerSettingsElem = systemElement.addElement(N_SERVLETCONTAINERSETTINGS); servletContainerSettingsElem.addAttribute(A_MODE, servletContainerSettings.getMode().getMode()); if (!servletContainerSettings.getMode().isAuto()) { servletContainerSettingsElem.addElement(N_PREVENTRESPONSEFLUSH).addText( "" + servletContainerSettings.isPreventResponseFlush()); servletContainerSettingsElem.addElement(N_RELEASETAGSAFTEREND).addText( "" + servletContainerSettings.isReleaseTagsAfterEnd()); if (servletContainerSettings.getRequestErrorPageAttribute() != null) { servletContainerSettingsElem.addElement(N_REQUESTERRORPAGEATTRIBUTE).addText( servletContainerSettings.getRequestErrorPageAttribute());
CmsServletContainerSettings servletContainerSettings = new CmsServletContainerSettings(context); getSystemInfo().init(servletContainerSettings); getSystemInfo().getServletContainerSettings().setServletThrowsException(throwExc);
/** * Creates a new system info container.<p> */ public CmsSystemInfo() { // set startup time m_startupTime = System.currentTimeMillis(); // init version information initVersion(); // set default encoding (will be changed again later when properties have been read) m_defaultEncoding = DEFAULT_ENCODING.intern(); // this may look odd, but initMembers in OpenCms core has to initialize this (e.g. for setup to avoid NPE) m_servletContainerSettings = new CmsServletContainerSettings(null); }
/** * Returns the OpenCms web application "WEB-INF" directory path.<p> * * @return the OpenCms web application "WEB-INF" directory path */ public String getWebInfRfsPath() { return m_servletContainerSettings.getWebInfRfsPath(); }
/** * Returns the OpenCms web application folder in the servlet container.<p> * * @return the OpenCms web application folder in the servlet container */ public String getWebApplicationRfsPath() { return m_servletContainerSettings.getWebApplicationRfsPath(); }
/** * Returns the OpenCms web application name, e.g. "opencms" or "ROOT" (no leading or trailing "/").<p> * * The web application name is stored for informational purposes only. * If you want to construct an URI, use either {@link #getContextPath()} and * {@link #getServletPath()}, or for links to the OpenCms VFS use {@link #getOpenCmsContext()}.<p> * * @return the OpenCms web application name * @see #getContextPath() * @see #getServletPath() * @see #getOpenCmsContext() */ public String getWebApplicationName() { return m_servletContainerSettings.getWebApplicationName(); }
/** * Returns the OpenCms servlet path, e.g. "/opencms".<p> * * <i>From the Java Servlet Specification v2.4:</i><br> * <b>Servlet Path:</b> 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.<p> * * @return the OpenCms servlet path * @see #getContextPath() * @see #getWebApplicationName() * @see #getOpenCmsContext() */ public String getServletPath() { return m_servletContainerSettings.getServletPath(); }
if (path == null) { String requestErrorPageAttribute = getSystemInfo().getServletContainerSettings().getRequestErrorPageAttribute(); if (requestErrorPageAttribute != null) {
/** * Returns the default web application name (usually "ROOT").<p> * * @return the default web application name */ public String getDefaultWebApplicationName() { return m_servletContainerSettings.getDefaultWebApplicationName(); }