Http Session management in Jsp

Http Session management in Jsp

  • getAttribute : it returns stored value from session object. It returns null if no value is associated with name.
  • setAttribute : It associates a value with name.
  • removeAttribute : It removes all the values associated with name.
  • getAttributeNames : It returns all attributes names in the session.
  • getId : it returns unique id in the session.
  • isNew : It determine if session is new to client.
  • getcreationTime : It returns time at which session was created.
  • getlastAccessedTime : It returns time at which session was accessed last by client.
  • getMaxInactiveInterval : It gets maximum amount of time session in seconds that access session before being invalidated.
  • setMaxInaxctiveInterval : It sets maximum amount of time session in seconds between client requests before session being invalidated.

Post a Comment

0 Comments

Recent in Recipes

3/Food/post-list