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
Can a jsp be called using a servlet?
What is the disadvantage of cookies?
What do you mean by httpservlet and how it is different from the genericservlet?
What is the servletconfig object?
Which are the different ways you can communicate between servlets?
What is servlet in simple terms?
What are some disadvantages of storing session state in cookies?
What do you mean by cgi?
What are sessions in servlets?
What is the use of attribute in servlets?
What is the difference between context parameter and context attribute?
Explain the different ways for servlet authentication?
What is the difference between genericservlet and httpservlet
Difference between get and post in java servlets?
What is meant by session? Tell me something about httpsession class?