/** * Sets a servlet context attribute given a attribute name and value. * * @param key the name of the attribute. * @param value the value to set. * @return the attribute that was just set. */ public Object put(Object key, Object value) { entries = null; context.setAttribute(key.toString(), value); return get(key); }
/** * Removes the specified servlet context attribute. * * @param key the attribute to remove. * @return the entry that was just removed. */ public Object remove(Object key) { entries = null; Object value = get(key); context.removeAttribute(key.toString()); return value; } }