Answer Posted / sandeep m
Cookie is a key value pair stored by server at client side
for session tracking any other related use.
Cookie class is available in javax.servlet.http package.
cookies can be retrieved from
javax.servlet.http.HttpServletRequest object using
getCookies() method.
getCookies() returns Cookie[] array object. Any number of
Cookies can be stored on response object.
cookie can be added to
javax.servlet.http.HttpServletResponse object. using
resp.addCookie(new Cookie("key","value"));
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How to read request headers from servlets?
Tell us something about servletconfig interface.
Which interface should be implemented by all servlets?
What are session variable in servlets?
Explain the servlet filter.
What is the
Write the code to get the server information in servlet.
What is ServletConfig object?
How to commuincate between an applet and a servlet?
What is the use of java servlet api?
Which event is fired at the time of session creation and destroy?
What is called Scriptlet?
What is the dispatcher servlet?
Can you send an authentication error from a servlet?
How do we share data using 'getservletcontext ()?