ApplicationContext object from the web application.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final Map | classCache
Cache Class object used for reflection. |
| private final ApplicationContext | context
Wrapped application context. |
| private final Map | objectCache
Cache method object. |
| Access | Constructor and Description |
|---|---|
| public | ApplicationContextFacade(ApplicationContext
The associated Context instance context)Construct a new instance of this class, associated with the specified Context instance. |
| Modifier and Type | Method and Description |
|---|---|
| public FilterRegistration. | addFilter(String
Name of filter to add filterName, String Name of filter class className)Implements jakarta. Add filter to context. |
| public FilterRegistration. | addFilter(String
Name of filter to add filterName, Filter Filter to add filter)Implements jakarta. Add filter to context. |
| public FilterRegistration. | addFilter(String
Name of filter to add filterName, Class<? extends Filter> Class of filter to add filterClass)Implements jakarta. Add filter to context. |
| public ServletRegistration. | addJspFile(String
The servlet name under which this JSP file should be registered jspName, String The path, relative to the web application root, for the JSP file to be used for this servlet jspFile)Implements jakarta. Add a JSP to the context. |
| public void | addListener(Class<? extends EventListener>
TODO listenerClass)Implements jakarta. TODO SERVLET3 - Add comments |
| public void | addListener(String
TODO className)Implements jakarta. TODO SERVLET3 - Add comments |
| public <T extends EventListener> void | addListener(T
TODO t)Implements jakarta. TODO SERVLET3 - Add comments |
| public ServletRegistration. | addServlet(String
The name of the servlet to register servletName, String The implementation class for the servlet className)Implements jakarta. Register a servlet implementation for use in this ServletContext. |
| public ServletRegistration. | addServlet(String
The name of the servlet to register servletName, Servlet The Servlet instance to register servlet)Implements jakarta. Register a servlet instance for use in this ServletContext. |
| public ServletRegistration. | addServlet(String
Name of servlet to add servletName, Class<? extends Servlet> Class of servlet to add servletClass)Implements jakarta. Add servlet to the context. |
| public <T extends Filter> T | createFilter(Class<T>
The the class for which an instance should be created c)Implements jakarta. Create a Filter instance using the given class. |
| public <T extends EventListener> T | createListener(Class<T>
TODO c)Implements jakarta. TODO SERVLET3 - Add comments |
| public <T extends Servlet> T | createServlet(Class<T>
The the class for which an instance should be created c)Implements jakarta. Create an Servlet instance using the given class. |
| public void | declareRoles(String...
The roles to add roleNames)Implements jakarta. Add to the declared roles for this ServletContext. |
| private Object | doPrivileged(final String
The method to call. methodName, final Object[] The arguments passed to the called method. params)Use reflection to invoke the requested method. |
| private Object | doPrivileged(final String
The method to invoke. methodName, final Class<?>[] The class where the method is. clazz, Object[] The arguments passed to the called method. params)Use reflection to invoke the requested method. |
| private Object | executeMethod(final Method
The method object to be invoked. method, final ApplicationContext The ApplicationContext object on which the method will be invoked context, final Object[] The arguments passed to the called method. params)Executes the method of the specified |
| public Object | getAttribute(String
a name)String specifying the name of the attributeImplements jakarta. Returns the servlet container attribute with the given name, or |
| public Enumeration | getAttributeNames()
Implements jakarta. Returns an |
| public ClassLoader | getClassLoader()
Implements jakarta. Get the web application class loader associated with this ServletContext. |
| public ServletContext | getContext(String
a uripath)String specifying the context path of another web application in the container.Implements jakarta. Returns a |
| public String | getContextPath()
Implements jakarta. Return the main path associated with this context. |
| public Set | getDefaultSessionTrackingModes()
Implements jakarta. Obtains the default session tracking modes for this web application. |
| public int | getEffectiveMajorVersion()
Implements jakarta. Obtain the major version of the servlet specification for which this web application is implemented. |
| public int | getEffectiveMinorVersion()
Implements jakarta. Obtain the minor version of the servlet specification for which this web application is implemented. |
| public Set | getEffectiveSessionTrackingModes()
Implements jakarta. Obtains the currently enabled session tracking modes for this web application. |
| public FilterRegistration | getFilterRegistration(String
TODO filterName)Implements jakarta. TODO SERVLET3 - Add comments |
| public Map | |
| public String | getInitParameter(String
a name)String containing the name of the parameter whose value is requestedImplements jakarta. Returns a |
| public Enumeration | getInitParameterNames()
Implements jakarta. Returns the names of the context's initialization parameters as an |
| public JspConfigDescriptor | |
| public int | getMajorVersion()
Implements jakarta. Returns the major version of the Java Servlet API that this servlet container supports. |
| public String | getMimeType(String
a file)String specifying the name of a fileImplements jakarta. Returns the MIME type of the specified file, or |
| public int | getMinorVersion()
Implements jakarta. Returns the minor version of the Servlet API that this servlet container supports. |
| public RequestDispatcher | getNamedDispatcher(String
a name)String specifying the name of a servlet to wrapImplements jakarta. Returns a |
| public String | getRealPath(String
a path)String specifying a virtual pathImplements jakarta. Returns a |
| public String | getRequestCharacterEncoding()
Implements jakarta. Get the default character encoding for reading request bodies. |
| public RequestDispatcher | getRequestDispatcher(final String
a path)String specifying the pathname to the resourceImplements jakarta. Returns a |
| public URL | getResource(String
a path)String specifying the path to the resourceImplements jakarta. Returns a URL to the resource that is mapped to a specified path. |
| public InputStream | getResourceAsStream(String
a path)String specifying the path to the resourceImplements jakarta. Returns the resource located at the named path as an |
| public Set | getResourcePaths(String
the partial path used to match the resources, which must start with a / path)Implements jakarta. Returns a directory-like listing of all the paths to resources within the web application whose longest sub-path matches the supplied path argument. |
| public String | getResponseCharacterEncoding()
Implements jakarta. Get the default character encoding for writing response bodies. |
| public String | getServerInfo()
Implements jakarta. Returns the name and version of the servlet container on which the servlet is running. |
| public String | getServletContextName()
Implements jakarta. 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. |
| public ServletRegistration | getServletRegistration(String
The name of the Servlet of interest servletName)Implements jakarta. Obtain the details of the named servlet. |
| public Map | getServletRegistrations()
Implements jakarta. Obtain a Map of servlet names to servlet registrations for all servlets registered with this context. |
| public SessionCookieConfig | |
| public int | getSessionTimeout()
Implements jakarta. Get the default session timeout. |
| public String | getVirtualServerName()
Implements jakarta. Get the primary name of the virtual host on which this context is deployed. |
| private void | |
| private void | |
| private Object | invokeMethod(ApplicationContext
The ApplicationContext object on which the method will be invoked appContext, final String The method to call. methodName, Object[] The arguments passed to the called method. params)Use reflection to invoke the requested method. |
| public void | log(String
a msg)String specifying the message to be written to the log fileImplements jakarta. Writes the specified message to a servlet log file, usually an event log. |
| public void | log(String
a message, Throwable String that describes the error or exceptionthe throwable)Throwable error or exceptionImplements jakarta. Writes an explanatory message and a stack trace for a given |
| public void | removeAttribute(String
a name)String specifying the name of the attribute to be removedImplements jakarta. Removes the attribute with the given name from the servlet context. |
| public void | setAttribute(String
a name, Object String specifying the name of the attributean object)Object representing the attribute to be boundImplements jakarta. Binds an object to a given attribute name in this servlet context. |
| public boolean | setInitParameter(String
Name of initialisation parameter name, String Value for initialisation parameter value)Implements jakarta. Set the given initialisation parameter to the given value. |
| public void | setRequestCharacterEncoding(String
The name of the character encoding to use encoding)Implements jakarta. Set the default character encoding to use for reading request bodies. |
| public void | setResponseCharacterEncoding(String
The name of the character encoding to use encoding)Implements jakarta. Set the default character encoding to use for writing response bodies. |
| public void | setSessionTimeout(int
The new default session timeout in minutes. sessionTimeout)Implements jakarta. Set the default session timeout. |
| public void | setSessionTrackingModes(Set<SessionTrackingMode>
The session tracking modes to use for this web application sessionTrackingModes)Implements jakarta. Configures the available session tracking modes for this web application. |