What are cookies and how will you use them?
Answers were Sorted based on User's Feedback
Answer / ravikiran.chd
cookies are the small server side components,which are used
to transfer small amount of client data
| Is This Answer Correct ? | 2 Yes | 1 No |
Answer / 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 |
Answer / usha
cookie is small piece of data set by the server on the
client ,for session tracking. When the server sets the
cookie as part of the response,the client will send the
cookie back to the server when it sends the next request.
Cookie is class in http package.Create Cookie object and
send it as part of response using
response.addCookie(cookie object)
can access the cookie using
request.getCookie();
| Is This Answer Correct ? | 0 Yes | 2 No |
Are Servlets by default thread safe or not? thanks in advance regards Sudhakar
What is servlet?
Hi Friends, Can we make any method thread safe withour synchronized keyword?
What exactly are the functions of servlet?
What are the types of protocols supported by httpservlet ?
Explain the difference between servletconfig and servletcontext in servlet?
What is a servlet context?
When servlet is loaded?
What are the difference between RMI and Servlets?
What are the objects involved when a servlet receives a call from client?
What are cookies and how will you use them?
can we use more than one controller in web application