What are cookies and how will you use them?

Answer Posted / usha

cookie is small piece of data set by the server on the
client ,for session tracking. When the server sets the
cookie as part of the response,the client will send the
cookie back to the server when it sends the next request.

Cookie is class in http package.Create Cookie object and
send it as part of response using
response.addCookie(cookie object)
can access the cookie using
request.getCookie();

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between the getrequestdispatcher(string path) method of javax.servlet.servletrequest interface and javax.servlet.servletcontext interface?

569


What do you mean by web applications? Explain web application directory arrangement?

542


Why do we have servlet filters?

607


Explain the differences between jsp and servlet.

546


What is the difference between Difference between doGet() and doPost()?

759






What is meant by Servlet? What are the parameters of service method?

601


What is meant by a web application

543


How would you create deadlock on your servlet?

624


What are the common methods that are included in the http servlet class?

580


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

833


what is multiple server?

1764


When Servlet is unloaded?

630


What's the architecture of a servlet package?

558


Explain the difference between generic servlet and http servlet?

543


How can you run a servlet program?

602