protected static class ReplicatedContext.ReplApplContext extends ApplicationContext
Modifier and Type | Field and Description |
---|---|
protected Map<String,Object> |
tomcatAttributes |
attributes, GET_RESOURCE_REQUIRE_SLASH, STRICT_SERVLET_COMPLIANCE
ORDERED_LIBS, TEMPDIR
Constructor and Description |
---|
ReplicatedContext.ReplApplContext(ReplicatedContext context) |
Modifier and Type | Method and Description |
---|---|
Object |
getAttribute(String name)
Returns the servlet container attribute with the given name, or
null if there is no attribute by that name. |
Map<String,Object> |
getAttributeMap() |
Enumeration<String> |
getAttributeNames()
Returns an
Enumeration containing the attribute names
available within this servlet context. |
protected ServletContext |
getFacade() |
protected ReplicatedContext |
getParent() |
void |
removeAttribute(String name)
Removes the attribute with the given name from the servlet context.
|
void |
setAttribute(String name,
Object value)
Binds an object to a given attribute name in this servlet context.
|
void |
setAttributeMap(Map<String,Object> map) |
addFilter, addFilter, addFilter, addListener, addListener, addListener, addServlet, addServlet, addServlet, clearAttributes, createFilter, createListener, createServlet, declareRoles, getClassLoader, getContext, getContext, getContextPath, getDefaultSessionTrackingModes, getEffectiveMajorVersion, getEffectiveMinorVersion, getEffectiveSessionTrackingModes, getFilterRegistration, getFilterRegistrations, getInitParameter, getInitParameterNames, getJspConfigDescriptor, getMajorVersion, getMimeType, getMinorVersion, getNamedDispatcher, getReadonlyAttributes, getRealPath, getRequestDispatcher, getResource, getResourceAsStream, getResourcePaths, getResources, getServerInfo, getServlet, getServletContextName, getServletNames, getServletRegistration, getServletRegistrations, getServlets, getSessionCookieConfig, log, log, log, setInitParameter, setNewServletContextListenerAllowed, setSessionTrackingModes
public ReplicatedContext.ReplApplContext(ReplicatedContext context)
protected ReplicatedContext getParent()
protected ServletContext getFacade()
getFacade
in class ApplicationContext
public void removeAttribute(String name)
ServletContext
ServletContext.getAttribute(java.lang.String)
to retrieve the
attribute's value will return null
.
If listeners are configured on the ServletContext
the
container notifies them accordingly.
removeAttribute
in interface ServletContext
removeAttribute
in class ApplicationContext
name
- a String
specifying the name of the attribute to
be removedpublic void setAttribute(String name, Object value)
ServletContext
If listeners are configured on the ServletContext
the
container notifies them accordingly.
If a null value is passed, the effect is the same as calling
removeAttribute()
.
Attribute names should follow the same convention as package names. The
Java Servlet API specification reserves names matching
java.*
, javax.*
, and sun.*
.
setAttribute
in interface ServletContext
setAttribute
in class ApplicationContext
name
- a String
specifying the name of the attributevalue
- an Object
representing the attribute to be boundpublic Object getAttribute(String name)
ServletContext
null
if there is no attribute by that name. An attribute
allows a servlet container to give the servlet additional information not
already provided by this interface. See your server documentation for
information about its attributes. A list of supported attributes can be
retrieved using getAttributeNames
.
The attribute is returned as a java.lang.Object
or some
subclass. Attribute names should follow the same convention as package
names. The Java Servlet API specification reserves names matching
java.*
, javax.*
, and sun.*
.
getAttribute
in interface ServletContext
getAttribute
in class ApplicationContext
name
- a String
specifying the name of the attributeObject
containing the value of the attribute, or
null
if no attribute exists matching the given nameServletContext.getAttributeNames()
public Enumeration<String> getAttributeNames()
ServletContext
Enumeration
containing the attribute names
available within this servlet context. Use the ServletContext.getAttribute(java.lang.String)
method with an attribute name to get the value of an attribute.getAttributeNames
in interface ServletContext
getAttributeNames
in class ApplicationContext
Enumeration
of attribute namesServletContext.getAttribute(java.lang.String)
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.