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
Is servlet a framework?
What is a servlet?
Explain web application directory arrangement?
Why do we have servlet wrapper classes?
What are the annotations used in servlet 3?
What are the steps that are required to handle the multi-threading?
Why are servlets used?
Why session tracking is needed?
What is the capacity the doget can send to the server?
Why servlet is used as controller ? Not JSP? I want complete explation?
What if we pass negative value in load-on-startup?
What is http servlet? Explain with the help of an example.
What is servlet and how it works?
What is servlet in tomcat?
What is the importance of init() method in Servlet ?