What is the use of session

Showing Answers 1 - 10 of 10 Answers

sirisha

  • Oct 26th, 2006
 

To Maintain the state of the client

  Was this answer useful?  Yes

Hi,

    Every user of a site is associated with a javax.servlet.http.HttpSession object that servlets can use to store or retrieve the information about the user. You can save any set of arbitrary objects in a session object. We can keep watch on the user with the help of session object. There are generally four ways to maintain session.

i) Hidden Form Fields

ii) URL Rewriting

iii) Cookies

iv) Session

                                      Abhishek(Sharad)

                          

  Was this answer useful?  Yes

Rajkumar

  • Nov 8th, 2006
 

Http is a stateless protocol.It doesn't remembers anything that happends in the previous request.After serving the client it closes the connection.when the same client makes once again request to the same application server takes it as a fresh request.If we take for example shopping cart application, in this case the server has to maintain the client data during the consecutive visits of the application in order to success fully run the application.For this reason we are using the session.session can be defined as "keeping the track of the information of the same client during the consecutive visits of the same application".There are different methods are available for maintaining the session like1)URL rewritting2)HiddenForm Fields3)Cookies4)HttpSessionwe need to also maintain the state of the data for the application....

  Was this answer useful?  Yes

karuppaiyan

  • Dec 25th, 2006
 

in the case of persistent cookies how  a serverpage identify same client, once again they visit to the same website after logout

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions