Package org.apache.jasper.servlet
Class JspCServletContext
- java.lang.Object
- 
- org.apache.jasper.servlet.JspCServletContext
 
- 
- All Implemented Interfaces:
- ServletContext
 
 public class JspCServletContext extends java.lang.Object implements ServletContext SimpleServletContextimplementation without HTTP-specific methods.- Author:
- Peter Rossbach (pr@webapp.de)
 
- 
- 
Field Summary- 
Fields inherited from interface javax.servlet.ServletContextORDERED_LIBS, TEMPDIR
 
- 
 - 
Constructor SummaryConstructors Constructor Description JspCServletContext(java.io.PrintWriter aLogWriter, java.net.URL aResourceBaseURL, java.lang.ClassLoader classLoader, boolean validate, boolean blockExternal)Create a new instance of this ServletContext implementation.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description FilterRegistration.DynamicaddFilter(java.lang.String filterName, java.lang.Class<? extends Filter> filterClass)Add filter to context.FilterRegistration.DynamicaddFilter(java.lang.String filterName, java.lang.String className)Add filter to context.FilterRegistration.DynamicaddFilter(java.lang.String filterName, Filter filter)Add filter to context.ServletRegistration.DynamicaddJspFile(java.lang.String jspName, java.lang.String jspFile)Add a JSP to the context.voidaddListener(java.lang.Class<? extends java.util.EventListener> listenerClass)TODO SERVLET3 - Add commentsvoidaddListener(java.lang.String className)TODO SERVLET3 - Add comments<T extends java.util.EventListener>
 voidaddListener(T t)TODO SERVLET3 - Add commentsServletRegistration.DynamicaddServlet(java.lang.String servletName, java.lang.Class<? extends Servlet> servletClass)Add servlet to the context.ServletRegistration.DynamicaddServlet(java.lang.String servletName, java.lang.String className)Register a servlet implementation for use in this ServletContext.ServletRegistration.DynamicaddServlet(java.lang.String servletName, Servlet servlet)Register a servlet instance for use in this ServletContext.<T extends Filter>
 TcreateFilter(java.lang.Class<T> c)Create a Filter instance using the given class.<T extends java.util.EventListener>
 TcreateListener(java.lang.Class<T> c)TODO SERVLET3 - Add comments<T extends Servlet>
 TcreateServlet(java.lang.Class<T> c)Create an Servlet instance using the given class.voiddeclareRoles(java.lang.String... roleNames)Add to the declared roles for this ServletContext.java.lang.ObjectgetAttribute(java.lang.String name)Return the specified context attribute, if any.java.util.Enumeration<java.lang.String>getAttributeNames()Return an enumeration of context attribute names.java.lang.ClassLoadergetClassLoader()Get the web application class loader associated with this ServletContext.ServletContextgetContext(java.lang.String uripath)Return the servlet context for the specified path.java.lang.StringgetContextPath()Return the context path.java.util.Set<SessionTrackingMode>getDefaultSessionTrackingModes()Obtains the default session tracking modes for this web application.intgetEffectiveMajorVersion()Obtain the major version of the servlet specification for which this web application is implemented.intgetEffectiveMinorVersion()Obtain the minor version of the servlet specification for which this web application is implemented.java.util.Set<SessionTrackingMode>getEffectiveSessionTrackingModes()Obtains the currently enabled session tracking modes for this web application.FilterRegistrationgetFilterRegistration(java.lang.String filterName)TODO SERVLET3 - Add commentsjava.util.Map<java.lang.String,? extends FilterRegistration>getFilterRegistrations()java.lang.StringgetInitParameter(java.lang.String name)Return the specified context initialization parameter.java.util.Enumeration<java.lang.String>getInitParameterNames()Return an enumeration of the names of context initialization parameters.JspConfigDescriptorgetJspConfigDescriptor()intgetMajorVersion()Return the Servlet API major version number.java.lang.StringgetMimeType(java.lang.String file)Return the MIME type for the specified filename.intgetMinorVersion()Return the Servlet API minor version number.RequestDispatchergetNamedDispatcher(java.lang.String name)Return a request dispatcher for the specified servlet name.java.lang.StringgetRealPath(java.lang.String path)Return the real path for the specified context-relative virtual path.java.lang.StringgetRequestCharacterEncoding()Get the default character encoding for reading request bodies.RequestDispatchergetRequestDispatcher(java.lang.String path)Return a request dispatcher for the specified context-relative path.java.net.URLgetResource(java.lang.String path)Return a URL object of a resource that is mapped to the specified context-relative path.java.io.InputStreamgetResourceAsStream(java.lang.String path)Return an InputStream allowing access to the resource at the specified context-relative path.java.util.Set<java.lang.String>getResourcePaths(java.lang.String path)Return the set of resource paths for the "directory" at the specified context path.java.lang.StringgetResponseCharacterEncoding()Get the default character encoding for writing response bodies.java.lang.StringgetServerInfo()Return descriptive information about this server.ServletgetServlet(java.lang.String name)Deprecated.This method has been deprecated with no replacementjava.lang.StringgetServletContextName()Return the name of this servlet context.java.util.Enumeration<java.lang.String>getServletNames()Deprecated.This method has been deprecated with no replacementServletRegistrationgetServletRegistration(java.lang.String servletName)Obtain the details of the named servlet.java.util.Map<java.lang.String,? extends ServletRegistration>getServletRegistrations()Obtain a Map of servlet names to servlet registrations for all servlets registered with this context.java.util.Enumeration<Servlet>getServlets()Deprecated.This method has been deprecated with no replacementSessionCookieConfiggetSessionCookieConfig()intgetSessionTimeout()Get the default session timeout.java.lang.StringgetVirtualServerName()Get the primary name of the virtual host on which this context is deployed.voidlog(java.lang.Exception exception, java.lang.String message)Deprecated.Use log(String,Throwable) insteadvoidlog(java.lang.String message)Log the specified message.voidlog(java.lang.String message, java.lang.Throwable exception)Log the specified message and exception.voidremoveAttribute(java.lang.String name)Remove the specified context attribute.voidsetAttribute(java.lang.String name, java.lang.Object value)Set or replace the specified context attribute.booleansetInitParameter(java.lang.String name, java.lang.String value)Set the given initialisation parameter to the given value.voidsetRequestCharacterEncoding(java.lang.String encoding)Set the default character encoding to use for reading request bodies.voidsetResponseCharacterEncoding(java.lang.String encoding)Set the default character encoding to use for writing response bodies.voidsetSessionTimeout(int sessionTimeout)Set the default session timeout.voidsetSessionTrackingModes(java.util.Set<SessionTrackingMode> sessionTrackingModes)Configures the available session tracking modes for this web application.
 
- 
- 
- 
Constructor Detail- 
JspCServletContextpublic JspCServletContext(java.io.PrintWriter aLogWriter, java.net.URL aResourceBaseURL, java.lang.ClassLoader classLoader, boolean validate, boolean blockExternal) throws JasperExceptionCreate a new instance of this ServletContext implementation.- Parameters:
- aLogWriter- PrintWriter which is used for- log()calls
- aResourceBaseURL- Resource base URL
- classLoader- Class loader for this- ServletContext
- validate- Should a validating parser be used to parse web.xml?
- blockExternal- Should external entities be blocked when parsing web.xml?
- Throws:
- JasperException- An error occurred building the merged web.xml
 
 
- 
 - 
Method Detail- 
getAttributepublic java.lang.Object getAttribute(java.lang.String name) Return the specified context attribute, if any.- Specified by:
- getAttributein interface- ServletContext
- Parameters:
- name- Name of the requested attribute
- Returns:
- an Objectcontaining the value of the attribute, ornullif no attribute exists matching the given name
- See Also:
- ServletContext.getAttributeNames()
 
 - 
getAttributeNamespublic java.util.Enumeration<java.lang.String> getAttributeNames() Return an enumeration of context attribute names.- Specified by:
- getAttributeNamesin interface- ServletContext
- Returns:
- an Enumerationof attribute names
- See Also:
- ServletContext.getAttribute(java.lang.String)
 
 - 
getContextpublic ServletContext getContext(java.lang.String uripath) Return the servlet context for the specified path.- Specified by:
- getContextin interface- ServletContext
- Parameters:
- uripath- Server-relative path starting with '/'
- Returns:
- the ServletContextobject that corresponds to the named URL, or null if either none exists or the container wishes to restrict this access.
- See Also:
- RequestDispatcher
 
 - 
getContextPathpublic java.lang.String getContextPath() Return the context path.- Specified by:
- getContextPathin interface- ServletContext
- Returns:
- The main context path
 
 - 
getInitParameterpublic java.lang.String getInitParameter(java.lang.String name) Return the specified context initialization parameter.- Specified by:
- getInitParameterin interface- ServletContext
- Parameters:
- name- Name of the requested parameter
- Returns:
- a Stringcontaining the value of the initialization parameter
- See Also:
- ServletConfig.getInitParameter(java.lang.String)
 
 - 
getInitParameterNamespublic java.util.Enumeration<java.lang.String> getInitParameterNames() Return an enumeration of the names of context initialization parameters.- Specified by:
- getInitParameterNamesin interface- ServletContext
- Returns:
- an EnumerationofStringobjects containing the names of the context's initialization parameters
- See Also:
- ServletConfig.getInitParameter(java.lang.String)
 
 - 
getMajorVersionpublic int getMajorVersion() Return the Servlet API major version number.- Specified by:
- getMajorVersionin interface- ServletContext
- Returns:
- 4
 
 - 
getMimeTypepublic java.lang.String getMimeType(java.lang.String file) Return the MIME type for the specified filename.- Specified by:
- getMimeTypein interface- ServletContext
- Parameters:
- file- Filename whose MIME type is requested
- Returns:
- a Stringspecifying the file's MIME type
 
 - 
getMinorVersionpublic int getMinorVersion() Return the Servlet API minor version number.- Specified by:
- getMinorVersionin interface- ServletContext
- Returns:
- 0
 
 - 
getNamedDispatcherpublic RequestDispatcher getNamedDispatcher(java.lang.String name) Return a request dispatcher for the specified servlet name.- Specified by:
- getNamedDispatcherin interface- ServletContext
- Parameters:
- name- Name of the requested servlet
- Returns:
- a RequestDispatcherobject that acts as a wrapper for the named servlet, ornullif theServletContextcannot return aRequestDispatcher
- See Also:
- RequestDispatcher,- ServletContext.getContext(java.lang.String),- ServletConfig.getServletName()
 
 - 
getRealPathpublic java.lang.String getRealPath(java.lang.String path) Return the real path for the specified context-relative virtual path.- Specified by:
- getRealPathin interface- ServletContext
- Parameters:
- path- The context-relative virtual path to resolve
- Returns:
- a Stringspecifying the real path, or null if the translation cannot be performed
 
 - 
getRequestDispatcherpublic RequestDispatcher getRequestDispatcher(java.lang.String path) Return a request dispatcher for the specified context-relative path.- Specified by:
- getRequestDispatcherin interface- ServletContext
- Parameters:
- path- Context-relative path for which to acquire a dispatcher
- Returns:
- a RequestDispatcherobject that acts as a wrapper for the resource at the specified path, ornullif theServletContextcannot return aRequestDispatcher
- See Also:
- RequestDispatcher,- ServletContext.getContext(java.lang.String)
 
 - 
getResourcepublic java.net.URL getResource(java.lang.String path) throws java.net.MalformedURLExceptionReturn a URL object of a resource that is mapped to the specified context-relative path.- Specified by:
- getResourcein interface- ServletContext
- Parameters:
- path- Context-relative path of the desired resource
- Returns:
- the resource located at the named path, or nullif there is no resource at that path
- Throws:
- java.net.MalformedURLException- if the resource path is not properly formed
 
 - 
getResourceAsStreampublic java.io.InputStream getResourceAsStream(java.lang.String path) Return an InputStream allowing access to the resource at the specified context-relative path.- Specified by:
- getResourceAsStreamin interface- ServletContext
- Parameters:
- path- Context-relative path of the desired resource
- Returns:
- the InputStreamreturned to the servlet, ornullif no resource exists at the specified path
 
 - 
getResourcePathspublic java.util.Set<java.lang.String> getResourcePaths(java.lang.String path) Return the set of resource paths for the "directory" at the specified context path.- Specified by:
- getResourcePathsin interface- ServletContext
- Parameters:
- path- Context-relative base path
- Returns:
- a Set containing the directory listing, or null if there are no resources in the web application whose path begins with the supplied path.
 
 - 
getServerInfopublic java.lang.String getServerInfo() Return descriptive information about this server.- Specified by:
- getServerInfoin interface- ServletContext
- Returns:
- a Stringcontaining at least the servlet container name and version number
 
 - 
getServlet@Deprecated public Servlet getServlet(java.lang.String name) throws ServletException Deprecated.This method has been deprecated with no replacementReturn a null reference for the specified servlet name.- Specified by:
- getServletin interface- ServletContext
- Parameters:
- name- Name of the requested servlet
- Returns:
- Always null
- Throws:
- ServletException- never
 
 - 
getServletContextNamepublic java.lang.String getServletContextName() Return the name of this servlet context.- Specified by:
- getServletContextNamein interface- ServletContext
- Returns:
- The name of the web application or null if no name has been declared in the deployment descriptor.
 
 - 
getServletNames@Deprecated public java.util.Enumeration<java.lang.String> getServletNames() Deprecated.This method has been deprecated with no replacementReturn an empty enumeration of servlet names.- Specified by:
- getServletNamesin interface- ServletContext
- Returns:
- Always and empty Enumeration
 
 - 
getServlets@Deprecated public java.util.Enumeration<Servlet> getServlets() Deprecated.This method has been deprecated with no replacementReturn an empty enumeration of servlets.- Specified by:
- getServletsin interface- ServletContext
- Returns:
- Always and empty Enumeration
 
 - 
logpublic void log(java.lang.String message) Log the specified message.- Specified by:
- login interface- ServletContext
- Parameters:
- message- The message to be logged
 
 - 
log@Deprecated public void log(java.lang.Exception exception, java.lang.String message)Deprecated.Use log(String,Throwable) insteadLog the specified message and exception.- Specified by:
- login interface- ServletContext
- Parameters:
- exception- The exception to be logged
- message- The message to be logged
 
 - 
logpublic void log(java.lang.String message, java.lang.Throwable exception)Log the specified message and exception.- Specified by:
- login interface- ServletContext
- Parameters:
- message- The message to be logged
- exception- The exception to be logged
 
 - 
removeAttributepublic void removeAttribute(java.lang.String name) Remove the specified context attribute.- Specified by:
- removeAttributein interface- ServletContext
- Parameters:
- name- Name of the attribute to remove
 
 - 
setAttributepublic void setAttribute(java.lang.String name, java.lang.Object value)Set or replace the specified context attribute.- Specified by:
- setAttributein interface- ServletContext
- Parameters:
- name- Name of the context attribute to set
- value- Corresponding attribute value
 
 - 
addFilterpublic FilterRegistration.Dynamic addFilter(java.lang.String filterName, java.lang.String className) Description copied from interface:javax.servlet.ServletContextAdd filter to context.- Specified by:
- addFilterin interface- ServletContext
- Parameters:
- filterName- Name of filter to add
- className- Name of filter class
- Returns:
- nullif the filter has already been fully defined, else a- FilterRegistration.Dynamicobject that can be used to further configure the filter
 
 - 
addServletpublic ServletRegistration.Dynamic addServlet(java.lang.String servletName, java.lang.String className) Description copied from interface:javax.servlet.ServletContextRegister a servlet implementation for use in this ServletContext.- Specified by:
- addServletin interface- ServletContext
- Parameters:
- servletName- The name of the servlet to register
- className- The implementation class for the servlet
- Returns:
- The registration object that enables further configuration
 
 - 
getDefaultSessionTrackingModespublic java.util.Set<SessionTrackingMode> getDefaultSessionTrackingModes() Description copied from interface:javax.servlet.ServletContextObtains the default session tracking modes for this web application. By defaultSessionTrackingMode.URLis always supported,SessionTrackingMode.COOKIEis supported unless thecookiesattribute has been set tofalsefor the context andSessionTrackingMode.SSLis supported if at least one of the connectors used by this context has the attributesecureset totrue.- Specified by:
- getDefaultSessionTrackingModesin interface- ServletContext
- Returns:
- The set of default session tracking modes for this web application
 
 - 
getEffectiveSessionTrackingModespublic java.util.Set<SessionTrackingMode> getEffectiveSessionTrackingModes() Description copied from interface:javax.servlet.ServletContextObtains the currently enabled session tracking modes for this web application.- Specified by:
- getEffectiveSessionTrackingModesin interface- ServletContext
- Returns:
- The value supplied via ServletContext.setSessionTrackingModes(Set)if one was previously set, else return the defaults
 
 - 
getSessionCookieConfigpublic SessionCookieConfig getSessionCookieConfig() - Specified by:
- getSessionCookieConfigin interface- ServletContext
- Returns:
- TODO
 
 - 
setSessionTrackingModespublic void setSessionTrackingModes(java.util.Set<SessionTrackingMode> sessionTrackingModes) Description copied from interface:javax.servlet.ServletContextConfigures the available session tracking modes for this web application.- Specified by:
- setSessionTrackingModesin interface- ServletContext
- Parameters:
- sessionTrackingModes- The session tracking modes to use for this web application
 
 - 
addFilterpublic FilterRegistration.Dynamic addFilter(java.lang.String filterName, Filter filter) Description copied from interface:javax.servlet.ServletContextAdd filter to context.- Specified by:
- addFilterin interface- ServletContext
- Parameters:
- filterName- Name of filter to add
- filter- Filter to add
- Returns:
- nullif the filter has already been fully defined, else a- FilterRegistration.Dynamicobject that can be used to further configure the filter
 
 - 
addFilterpublic FilterRegistration.Dynamic addFilter(java.lang.String filterName, java.lang.Class<? extends Filter> filterClass) Description copied from interface:javax.servlet.ServletContextAdd filter to context.- Specified by:
- addFilterin interface- ServletContext
- Parameters:
- filterName- Name of filter to add
- filterClass- Class of filter to add
- Returns:
- nullif the filter has already been fully defined, else a- FilterRegistration.Dynamicobject that can be used to further configure the filter
 
 - 
addServletpublic ServletRegistration.Dynamic addServlet(java.lang.String servletName, Servlet servlet) Description copied from interface:javax.servlet.ServletContextRegister a servlet instance for use in this ServletContext.- Specified by:
- addServletin interface- ServletContext
- Parameters:
- servletName- The name of the servlet to register
- servlet- The Servlet instance to register
- Returns:
- The registration object that enables further configuration
 
 - 
addServletpublic ServletRegistration.Dynamic addServlet(java.lang.String servletName, java.lang.Class<? extends Servlet> servletClass) Description copied from interface:javax.servlet.ServletContextAdd servlet to the context.- Specified by:
- addServletin interface- ServletContext
- Parameters:
- servletName- Name of servlet to add
- servletClass- Class of servlet to add
- Returns:
- nullif the servlet has already been fully defined, else a- ServletRegistration.Dynamicobject that can be used to further configure the servlet
 
 - 
addJspFilepublic ServletRegistration.Dynamic addJspFile(java.lang.String jspName, java.lang.String jspFile) Description copied from interface:javax.servlet.ServletContextAdd a JSP to the context.- Specified by:
- addJspFilein interface- ServletContext
- Parameters:
- jspName- The servlet name under which this JSP file should be registered
- jspFile- The path, relative to the web application root, for the JSP file to be used for this servlet
- Returns:
- a ServletRegistration.Dynamicobject that can be used to further configure the servlet
 
 - 
createFilterpublic <T extends Filter> T createFilter(java.lang.Class<T> c) throws ServletException Description copied from interface:javax.servlet.ServletContextCreate a Filter instance using the given class. The instance is just created. No initialisation occurs.- Specified by:
- createFilterin interface- ServletContext
- Type Parameters:
- T- The type for the given class
- Parameters:
- c- The the class for which an instance should be created
- Returns:
- The created Filter instance.
- Throws:
- ServletException- If the Filter instance cannot be created
 
 - 
createServletpublic <T extends Servlet> T createServlet(java.lang.Class<T> c) throws ServletException Description copied from interface:javax.servlet.ServletContextCreate an Servlet instance using the given class. The instance is just created. No initialisation occurs.- Specified by:
- createServletin interface- ServletContext
- Type Parameters:
- T- The type for the given class
- Parameters:
- c- The the class for which an instance should be created
- Returns:
- The created Servlet instance.
- Throws:
- ServletException- If the servlet instance cannot be created.
 
 - 
getFilterRegistrationpublic FilterRegistration getFilterRegistration(java.lang.String filterName) Description copied from interface:javax.servlet.ServletContextTODO SERVLET3 - Add comments- Specified by:
- getFilterRegistrationin interface- ServletContext
- Parameters:
- filterName- TODO
- Returns:
- TODO
 
 - 
getServletRegistrationpublic ServletRegistration getServletRegistration(java.lang.String servletName) Description copied from interface:javax.servlet.ServletContextObtain the details of the named servlet.- Specified by:
- getServletRegistrationin interface- ServletContext
- Parameters:
- servletName- The name of the Servlet of interest
- Returns:
- The registration details for the named Servlet or nullif no Servlet has been registered with the given name
 
 - 
setInitParameterpublic boolean setInitParameter(java.lang.String name, java.lang.String value)Description copied from interface:javax.servlet.ServletContextSet the given initialisation parameter to the given value.- Specified by:
- setInitParameterin interface- ServletContext
- Parameters:
- name- Name of initialisation parameter
- value- Value for initialisation parameter
- Returns:
- trueif the call succeeds or- falseif the call fails because an initialisation parameter with the same name has already been set
 
 - 
addListenerpublic void addListener(java.lang.Class<? extends java.util.EventListener> listenerClass) Description copied from interface:javax.servlet.ServletContextTODO SERVLET3 - Add comments- Specified by:
- addListenerin interface- ServletContext
- Parameters:
- listenerClass- TODO
 
 - 
addListenerpublic void addListener(java.lang.String className) Description copied from interface:javax.servlet.ServletContextTODO SERVLET3 - Add comments- Specified by:
- addListenerin interface- ServletContext
- Parameters:
- className- TODO
 
 - 
addListenerpublic <T extends java.util.EventListener> void addListener(T t) Description copied from interface:javax.servlet.ServletContextTODO SERVLET3 - Add comments- Specified by:
- addListenerin interface- ServletContext
- Type Parameters:
- T- TODO
- Parameters:
- t- TODO
 
 - 
createListenerpublic <T extends java.util.EventListener> T createListener(java.lang.Class<T> c) throws ServletExceptionDescription copied from interface:javax.servlet.ServletContextTODO SERVLET3 - Add comments- Specified by:
- createListenerin interface- ServletContext
- Type Parameters:
- T- TODO
- Parameters:
- c- TODO
- Returns:
- TODO
- Throws:
- ServletException- TODO
 
 - 
declareRolespublic void declareRoles(java.lang.String... roleNames) Description copied from interface:javax.servlet.ServletContextAdd to the declared roles for this ServletContext.- Specified by:
- declareRolesin interface- ServletContext
- Parameters:
- roleNames- The roles to add
 
 - 
getClassLoaderpublic java.lang.ClassLoader getClassLoader() Description copied from interface:javax.servlet.ServletContextGet the web application class loader associated with this ServletContext.- Specified by:
- getClassLoaderin interface- ServletContext
- Returns:
- The associated web application class loader
 
 - 
getEffectiveMajorVersionpublic int getEffectiveMajorVersion() Description copied from interface:javax.servlet.ServletContextObtain the major version of the servlet specification for which this web application is implemented.- Specified by:
- getEffectiveMajorVersionin interface- ServletContext
- Returns:
- The major version declared in web.xml
 
 - 
getEffectiveMinorVersionpublic int getEffectiveMinorVersion() Description copied from interface:javax.servlet.ServletContextObtain the minor version of the servlet specification for which this web application is implemented.- Specified by:
- getEffectiveMinorVersionin interface- ServletContext
- Returns:
- The minor version declared in web.xml
 
 - 
getFilterRegistrationspublic java.util.Map<java.lang.String,? extends FilterRegistration> getFilterRegistrations() - Specified by:
- getFilterRegistrationsin interface- ServletContext
- Returns:
- TODO
 
 - 
getJspConfigDescriptorpublic JspConfigDescriptor getJspConfigDescriptor() - Specified by:
- getJspConfigDescriptorin interface- ServletContext
- Returns:
- TODO
 
 - 
getServletRegistrationspublic java.util.Map<java.lang.String,? extends ServletRegistration> getServletRegistrations() Description copied from interface:javax.servlet.ServletContextObtain a Map of servlet names to servlet registrations for all servlets registered with this context.- Specified by:
- getServletRegistrationsin interface- ServletContext
- Returns:
- A Map of servlet names to servlet registrations for all servlets registered with this context
 
 - 
getVirtualServerNamepublic java.lang.String getVirtualServerName() Description copied from interface:javax.servlet.ServletContextGet the primary name of the virtual host on which this context is deployed. The name may or may not be a valid host name.- Specified by:
- getVirtualServerNamein interface- ServletContext
- Returns:
- The primary name of the virtual host on which this context is deployed
 
 - 
getSessionTimeoutpublic int getSessionTimeout() Description copied from interface:javax.servlet.ServletContextGet the default session timeout.- Specified by:
- getSessionTimeoutin interface- ServletContext
- Returns:
- The current default session timeout in minutes
 
 - 
setSessionTimeoutpublic void setSessionTimeout(int sessionTimeout) Description copied from interface:javax.servlet.ServletContextSet the default session timeout. This method may only be called before the ServletContext is initialised.- Specified by:
- setSessionTimeoutin interface- ServletContext
- Parameters:
- sessionTimeout- The new default session timeout in minutes.
 
 - 
getRequestCharacterEncodingpublic java.lang.String getRequestCharacterEncoding() Description copied from interface:javax.servlet.ServletContextGet the default character encoding for reading request bodies.- Specified by:
- getRequestCharacterEncodingin interface- ServletContext
- Returns:
- The character encoding name or nullif no default has been specified
 
 - 
setRequestCharacterEncodingpublic void setRequestCharacterEncoding(java.lang.String encoding) Description copied from interface:javax.servlet.ServletContextSet the default character encoding to use for reading request bodies. Calling this method will over-ride any value set in the deployment descriptor.- Specified by:
- setRequestCharacterEncodingin interface- ServletContext
- Parameters:
- encoding- The name of the character encoding to use
 
 - 
getResponseCharacterEncodingpublic java.lang.String getResponseCharacterEncoding() Description copied from interface:javax.servlet.ServletContextGet the default character encoding for writing response bodies.- Specified by:
- getResponseCharacterEncodingin interface- ServletContext
- Returns:
- The character encoding name or nullif no default has been specified
 
 - 
setResponseCharacterEncodingpublic void setResponseCharacterEncoding(java.lang.String encoding) Description copied from interface:javax.servlet.ServletContextSet the default character encoding to use for writing response bodies. Calling this method will over-ride any value set in the deployment descriptor.- Specified by:
- setResponseCharacterEncodingin interface- ServletContext
- Parameters:
- encoding- The name of the character encoding to use
 
 
- 
 
-