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
What are the difference between session and cookies in servlet? Explain
What is the difference between Servlet Request and Servlet Context when calling a Request Dispatcher?
Explain their methods? Tell me their parameter names also have you used threads in servlet?
What is a web application and what is it’s directory structure?
What are the ways to handle multi-threading in servlets?
What is the difference between Server and Container?
What are the types of Session Tracking ?
What is the type of method for sending request from http server?
What are different Authentication options available in Servlets.
How to get the path of servlet in the server?
What do you mean by httpservlet?
Where do you define dispatcherservlet?
Can you call a jsp from the servlet?
List some life cycle methods of a servlet.
What is a deployment descriptor?