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 is session tracking?
Explain their methods? Tell me their parameter names also have you used threads in servlet?
How we can create war file in servlet?
Explain the lifecycle of a servlet?
Can we fetch the attributes related to a servlet on a different servlet?
What is difference between get and post method?
What is the difference in between the httpservlet and generic servlet?
What is the difference between servlet and filter?
Why do we need servlet filter?
Should I override the service() method?
What is meant by a web application
Can servlet have a constructor ?
If some new data has entered the database, explain how can a servlet refresh automatically?
Once the destroy() method is called by the container, will the servlet be immediately destroyed? What happens to the tasks(threads) that the servlet might be executing at that time?
Does servlet have main method?