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 created

getLastAccessedTime

– Returns time at which session was last sent from client

getMaxInactiveInterval, setMaxInactiveInterval

– Gets or sets the amount of time session should go without access before being invalidated

invalidate

– Invalidates current session



1 comments:

Feeds Comments
Anonymous said...

thanks..!! very helpful..! nice collection of concepts..!

Please give your valuable comments.