Answer Posted / tulasi vani
Cookies are small bit of textual information that are sent
from the webserver to the browser and sent back from the
browser to the server without changing the data later.
Cookies are helpful during e-commerce sessions when it will
be possible to recoginise a user during a session or it
helps in advertising as we can know the user preferences.
Cookies are created using:
Cookie c=new Cookie("name",value);
response.addCookie(c);
you can retrive the cookie value using:
request.getCookie() which returns a String giving the name
of the cookie and the value associated with the cookie.
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
When a client request is sent to the servlet container, how does the container choose which servlet to invoke?
When servlet is loaded?
Explain the jar and war files in servlet?
What is the difference between get and post methods?
How can you push data from an Applet to a Servlet?
How does tomcat servlet container work?
What is the difference between Server and Container?
What is a deployment descriptor?
What is a java servlet?
How to generate the server side programming and the advantages of it over the other languages?
Which method of the httpservletrequest object is used?
What is servlet looping or chaining?
What is Request Dispatcher?
What are the different ways we can maintain state between requests?
explain the advantages of servlet life cycle?