18 June 2010
1 What are HttpSession Methods in JAVA
getAttribute
– Extracts a previously stored value from a session object. Returns null if no value is associated with given name.setAttribute
– Associates a value with a name. Monitor changes: values implement HttpSessionBindingListener.removeAttribute
– Removes values associated with name.getAttributeNames
– Returns names of all attributes in the session.getId
– Returns the unique identifier.isNew
– Determines if session is new to client (not to page)getCreationTime
– Returns time at which session was first createdgetLastAccessedTime
– Returns time at which session was last sent from clientgetMaxInactiveInterval, setMaxInactiveInterval
– Gets or sets the amount of time session should go without access before being invalidatedinvalidate
– Invalidates current session
Labels:
Basic Java,
Java Tutorial,
Session Tracking,
Web Technologies
Subscribe to:
Post Comments (Atom)
1 comments:
thanks..!! very helpful..! nice collection of concepts..!
Please give your valuable comments.