/** * Saves an attribute in the request. * * @param key the name of the request attribute. * @param value the value to set. * @return the object that was just set. */ public Object put(Object key, Object value) { entries = null; request.setAttribute(key.toString(), value); return get(key); }
/** * Removes the specified request attribute. * * @param key the name of the attribute to remove. * @return the value that was removed or <tt>null</tt> if the value was not found (and hence, not removed). */ public Object remove(Object key) { entries = null; Object value = get(key); request.removeAttribute(key.toString()); return value; } }