Package org.apache.struts2.dispatcher
Class ApplicationMap
- All Implemented Interfaces:
- Serializable,- Map<String,- Object> 
A simple implementation of the 
Map interface to handle a collection of attributes and
 init parameters in a ServletContext object. The entrySet() method
 enumerates over all servlet context attributes and init parameters and returns a collection of both.
 Note, this will occur lazily - only when the entry set is asked for.- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from class java.util.AbstractMapAbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> 
- 
Constructor SummaryConstructorsConstructorDescriptionApplicationMap(jakarta.servlet.ServletContext ctx) Creates a new map object given the servlet context.
- 
Method SummaryModifier and TypeMethodDescriptionvoidclear()Removes all entries from the Map and removes all attributes from the servlet context.entrySet()Creates a Set of all servlet context attributes as well as context init parameters.Returns the servlet context attribute or init parameter based on the given key.Sets a servlet context attribute given a attribute name and value.Removes the specified servlet context attribute.Methods inherited from class java.util.AbstractMapclone, containsKey, containsValue, equals, hashCode, isEmpty, keySet, putAll, size, toString, valuesMethods inherited from class java.lang.Objectfinalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Mapcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
- 
Constructor Details- 
ApplicationMappublic ApplicationMap(jakarta.servlet.ServletContext ctx) Creates a new map object given the servlet context.- Parameters:
- ctx- the servlet context
 
 
- 
- 
Method Details- 
clearpublic void clear()Removes all entries from the Map and removes all attributes from the servlet context.
- 
entrySetCreates a Set of all servlet context attributes as well as context init parameters.
- 
getReturns the servlet context attribute or init parameter based on the given key. If the entry is not found, null is returned.
- 
putSets a servlet context attribute given a attribute name and value.
- 
removeRemoves the specified servlet context attribute.
 
-