What is the need of session tracking in HttpServlet ?

Answer Posted / priya

Session is a time period within which a user enters a
webpage,access the data or performs some operations and
quits the page.

Consider the usual example of a shopping cart(which is
widely used to explain session tracking)where a user buys a
book and puts it in the cart, then starts browsing at other
books or check the list of books to buy another book.In
that case, it should be possible to keep track of that user
in the session otherwise it will not be possible to
identify the user and you cannot keep track of that user.

Is This Answer Correct ?    11 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between cookies and httpsession?

771


What exception should be thrown when servlet is not properly initialized?

760


Which http method is said to be non-idempotent and idempotent?

810


Can we use threads in Servlets?

841


Where do you define dispatcherservlet?

743


What is the type of method for sending request from http server?

791


How to read request headers from servlets?

792


How servlets are deployed in java?

729


What is the difference between context parameter and context attribute?

728


What is servlet configuration?

757


If servlet receives multiple requests, how many objects will it create?

1065


How to get the IP address of client in servlet?

822


How to get the current httpsession object?

867


Why jsp is better than servlet?

736


How we can get ip address of client in servlet?

735