A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://javaee.github.io/javaee-spec/javadocs/javax/servlet/ServletContext.html below:

ServletContext (Java(TM) EE 8 Specification APIs)

Modifier and Type Method and Description FilterRegistration.Dynamic addFilter(String filterName, Class<? extends Filter> filterClass)

Adds the filter with the given name and class type to this servlet context.

FilterRegistration.Dynamic addFilter(String filterName, Filter filter)

Registers the given filter instance with this ServletContext under the given filterName.

FilterRegistration.Dynamic addFilter(String filterName, String className)

Adds the filter with the given name and class name to this servlet context.

ServletRegistration.Dynamic addJspFile(String servletName, String jspFile)

Adds the servlet with the given jsp file to this servlet context.

void addListener(Class<? extends EventListener> listenerClass)

Adds a listener of the given class type to this ServletContext.

void addListener(String className)

Adds the listener with the given class name to this ServletContext.

<T extends EventListener>
void
addListener(T t)

Adds the given listener to this ServletContext.

ServletRegistration.Dynamic addServlet(String servletName, Class<? extends Servlet> servletClass)

Adds the servlet with the given name and class type to this servlet context.

ServletRegistration.Dynamic addServlet(String servletName, Servlet servlet)

Registers the given servlet instance with this ServletContext under the given servletName.

ServletRegistration.Dynamic addServlet(String servletName, String className)

Adds the servlet with the given name and class name to this servlet context.

<T extends Filter>
T
createFilter(Class<T> clazz)

Instantiates the given Filter class.

<T extends EventListener>
T
createListener(Class<T> clazz)

Instantiates the given EventListener class.

<T extends Servlet>
T
createServlet(Class<T> clazz)

Instantiates the given Servlet class.

void declareRoles(String... roleNames)

Declares role names that are tested using isUserInRole.

Object getAttribute(String name)

Returns the servlet container attribute with the given name, or null if there is no attribute by that name.

Enumeration<String> getAttributeNames()

Returns an Enumeration containing the attribute names available within this ServletContext.

ClassLoader getClassLoader()

Gets the class loader of the web application represented by this ServletContext.

ServletContext getContext(String uripath)

Returns a ServletContext object that corresponds to a specified URL on the server.

String getContextPath()

Returns the context path of the web application.

Set<SessionTrackingMode> getDefaultSessionTrackingModes()

Gets the session tracking modes that are supported by default for this ServletContext.

int getEffectiveMajorVersion()

Gets the major version of the Servlet specification that the application represented by this ServletContext is based on.

int getEffectiveMinorVersion()

Gets the minor version of the Servlet specification that the application represented by this ServletContext is based on.

Set<SessionTrackingMode> getEffectiveSessionTrackingModes()

Gets the session tracking modes that are in effect for this ServletContext.

FilterRegistration getFilterRegistration(String filterName)

Gets the FilterRegistration corresponding to the filter with the given filterName.

Map<String,? extends FilterRegistration> getFilterRegistrations()

Gets a (possibly empty) Map of the FilterRegistration objects (keyed by filter name) corresponding to all filters registered with this ServletContext.

String getInitParameter(String name)

Returns a String containing the value of the named context-wide initialization parameter, or null if the parameter does not exist.

Enumeration<String> getInitParameterNames()

Returns the names of the context's initialization parameters as an Enumeration of String objects, or an empty Enumeration if the context has no initialization parameters.

JspConfigDescriptor getJspConfigDescriptor()

Gets the <jsp-config> related configuration that was aggregated from the web.xml and web-fragment.xml descriptor files of the web application represented by this ServletContext.

int getMajorVersion()

Returns the major version of the Servlet API that this servlet container supports.

String getMimeType(String file)

Returns the MIME type of the specified file, or null if the MIME type is not known.

int getMinorVersion()

Returns the minor version of the Servlet API that this servlet container supports.

RequestDispatcher getNamedDispatcher(String name) String getRealPath(String path)

Gets the real path corresponding to the given virtual path.

String getRequestCharacterEncoding()

Gets the request character encoding that are supported by default for this ServletContext.

RequestDispatcher getRequestDispatcher(String path)

Returns a

RequestDispatcher

object that acts as a wrapper for the resource located at the given path.

URL getResource(String path)

Returns a URL to the resource that is mapped to the given path.

InputStream getResourceAsStream(String path)

Returns the resource located at the named path as an InputStream object.

Set<String> getResourcePaths(String path)

Returns a directory-like listing of all the paths to resources within the web application whose longest sub-path matches the supplied path argument.

String getResponseCharacterEncoding()

Gets the response character encoding that are supported by default for this ServletContext.

String getServerInfo()

Returns the name and version of the servlet container on which the servlet is running.

Servlet getServlet(String name) String getServletContextName()

Returns the name of this web application corresponding to this ServletContext as specified in the deployment descriptor for this web application by the display-name element.

Enumeration<String> getServletNames() ServletRegistration getServletRegistration(String servletName)

Gets the ServletRegistration corresponding to the servlet with the given servletName.

Map<String,? extends ServletRegistration> getServletRegistrations()

Gets a (possibly empty) Map of the ServletRegistration objects (keyed by servlet name) corresponding to all servlets registered with this ServletContext.

Enumeration<Servlet> getServlets() SessionCookieConfig getSessionCookieConfig()

Gets the

SessionCookieConfig

object through which various properties of the session tracking cookies created on behalf of this

ServletContext

may be configured.

int getSessionTimeout()

Gets the session timeout in minutes that are supported by default for this ServletContext.

String getVirtualServerName()

Returns the configuration name of the logical host on which the ServletContext is deployed.

void log(Exception exception, String msg) void log(String msg)

Writes the specified message to a servlet log file, usually an event log.

void log(String message, Throwable throwable)

Writes an explanatory message and a stack trace for a given Throwable exception to the servlet log file.

void removeAttribute(String name)

Removes the attribute with the given name from this ServletContext.

void setAttribute(String name, Object object)

Binds an object to a given attribute name in this ServletContext.

boolean setInitParameter(String name, String value)

Sets the context initialization parameter with the given name and value on this ServletContext.

void setRequestCharacterEncoding(String encoding)

Sets the request character encoding for this ServletContext.

void setResponseCharacterEncoding(String encoding)

Sets the response character encoding for this ServletContext.

void setSessionTimeout(int sessionTimeout)

Sets the session timeout in minutes for this ServletContext.

void setSessionTrackingModes(Set<SessionTrackingMode> sessionTrackingModes)

Sets the session tracking modes that are to become effective for this ServletContext.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.3