What are setComment and getComment methods in Cookies?

Answer Posted / satendra

getComment() : Returns the comment describing the purpose of
this cookie, or null if no such comment has been defined.
and setComment() is used to provide description about cookie.

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Describe some assignments that are executed by servlet container?

579


What is servlet and its life cycle?

566


What is cookies in servlet with example?

518


How does tomcat servlet container work?

592


Can we refresh servlet in client and server side automatically?

591






Explain how does JSP handle run-time exceptions?

580


What is httpservlet and how it is different from genericservlet?

604


What are the life-cycle methods for a servlet?

551


Explain the custom jsp tags and the beans.

615


What are the types of servlet?

662


What’s the difference between sendredirect and forward methods

564


What are some advantages of storing session state in cookies?

593


What is preinitialization of a servlet?

580


Difference between get and post in java servlets?

543


How to upload a file to the server using servlet?

531