Session.setAttribute

Binds the specified {@code value} to this session, uniquely identified by the specified {@code key} name. If there is already an object bound under the {@code key} name, that existing object will be replaced by the new {@code value}. <p/> If the {@code value} parameter is null, it has the same effect as if {@link #removeAttribute(Object) removeAttribute} was called.

@param key the name under which the {@code value} object will be bound in this session @param value the object to bind in this session. @throws InvalidSessionException if this session has stopped or expired prior to calling this method.

  1. void setAttribute(Object key, Object value)
    interface Session
    void
    setAttribute
    (
    Object key
    ,
    Object value
    )
  2. void setAttribute(string key, Object value)
  3. void setAttribute(string key, string value)

Meta