@Deprecated public interface ServletContext extends ServletContext
ORDERED_LIBS, TEMPDIR
Modifier and Type | Method and Description |
---|---|
ServletRegistration.Dynamic |
addJspFile(String jspName,
String jspFile)
Deprecated.
|
String |
getRequestCharacterEncoding()
Deprecated.
Get the default character encoding for reading request bodies.
|
String |
getResponseCharacterEncoding()
Deprecated.
Get the default character encoding for writing response bodies.
|
int |
getSessionTimeout()
Deprecated.
Get the default session timeout.
|
void |
setRequestCharacterEncoding(String encoding)
Deprecated.
Set the default character encoding to use for reading request bodies.
|
void |
setResponseCharacterEncoding(String encoding)
Deprecated.
Set the default character encoding to use for writing response bodies.
|
void |
setSessionTimeout(int sessionTimeout)
Deprecated.
Set the default session timeout.
|
addFilter, addFilter, addFilter, addListener, addListener, addListener, addServlet, addServlet, addServlet, createFilter, createListener, createServlet, declareRoles, getAttribute, getAttributeNames, getClassLoader, getContext, getContextPath, getDefaultSessionTrackingModes, getEffectiveMajorVersion, getEffectiveMinorVersion, getEffectiveSessionTrackingModes, getFilterRegistration, getFilterRegistrations, getInitParameter, getInitParameterNames, getJspConfigDescriptor, getMajorVersion, getMimeType, getMinorVersion, getNamedDispatcher, getRealPath, getRequestDispatcher, getResource, getResourceAsStream, getResourcePaths, getServerInfo, getServlet, getServletContextName, getServletNames, getServletRegistration, getServletRegistrations, getServlets, getSessionCookieConfig, getVirtualServerName, log, log, log, removeAttribute, setAttribute, setInitParameter, setSessionTrackingModes
ServletRegistration.Dynamic addJspFile(String jspName, String jspFile)
jspName
- The servlet name under which this JSP file should be
registeredjspFile
- The path, relative to the web application root, for the
JSP file to be used for this servletServletRegistration.Dynamic
object
that can be used to further configure the servletint getSessionTimeout()
UnsupportedOperationException
- If called from a
ServletContextListener.contextInitialized(ServletContextEvent)
method of a ServletContextListener
that was not defined in a
web.xml file, a web-fragment.xml file nor annotated with
WebListener
. For example, a
ServletContextListener
defined in a TLD would not be able to
use this method.void setSessionTimeout(int sessionTimeout)
sessionTimeout
- The new default session timeout in minutes.UnsupportedOperationException
- If called from a
ServletContextListener.contextInitialized(ServletContextEvent)
method of a ServletContextListener
that was not defined in a
web.xml file, a web-fragment.xml file nor annotated with
WebListener
. For example, a
ServletContextListener
defined in a TLD would not be able to
use this method.IllegalStateException
- If the ServletContext has already been
initialisedString getRequestCharacterEncoding()
null
if no default has
been specifiedUnsupportedOperationException
- If called from a
ServletContextListener.contextInitialized(ServletContextEvent)
method of a ServletContextListener
that was not defined in a
web.xml file, a web-fragment.xml file nor annotated with
WebListener
. For example, a
ServletContextListener
defined in a TLD would not be able to
use this method.void setRequestCharacterEncoding(String encoding)
encoding
- The name of the character encoding to useUnsupportedOperationException
- If called from a
ServletContextListener.contextInitialized(ServletContextEvent)
method of a ServletContextListener
that was not defined in a
web.xml file, a web-fragment.xml file nor annotated with
WebListener
. For example, a
ServletContextListener
defined in a TLD would not be able to
use this method.IllegalStateException
- If the ServletContext has already been
initialisedString getResponseCharacterEncoding()
null
if no default has
been specifiedUnsupportedOperationException
- If called from a
ServletContextListener.contextInitialized(ServletContextEvent)
method of a ServletContextListener
that was not defined in a
web.xml file, a web-fragment.xml file nor annotated with
WebListener
. For example, a
ServletContextListener
defined in a TLD would not be able to
use this method.void setResponseCharacterEncoding(String encoding)
encoding
- The name of the character encoding to useUnsupportedOperationException
- If called from a
ServletContextListener.contextInitialized(ServletContextEvent)
method of a ServletContextListener
that was not defined in a
web.xml file, a web-fragment.xml file nor annotated with
WebListener
. For example, a
ServletContextListener
defined in a TLD would not be able to
use this method.IllegalStateException
- If the ServletContext has already been
initialisedCopyright © 2000-2019 Apache Software Foundation. All Rights Reserved.