What are setSecure() and getSecure() methods in Cookies?

Answer Posted / harikrishna ravada

setSecure:

Indicates to the user agent that the cookie should only be
sent using a secure protocol (https). This should only be
set when the cookie's originating server used a secure
protocol to set the cookie's value.

public void setSecure(boolean flag)

getSecure:

Returns the value of the 'secure' flag.

public boolean getSecure()

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which event is fired at the time of setting, getting or removing attribute from application scope?

855


What are the type of protocols used in httpservlet?

779


Can we fetch the attributes related to a servlet on a different servlet?

850


What are advantages of servlets over cgi?

809


What are the new features added to servlet 2.5?

817


When servlet is loaded?

782


What are the important functions of filters?

794


What is the purpose of requestdispatcher interface?

800


What is the difference between portlet and servlet?

695


What are the steps that are required to handle the multi-threading?

832


What do you mean by web applications?

829


How the servlet is loaded?

777


how to link html file to sevlet file.one name is textbox,c&c++ is cheakbox,bc&mca is radio button and one submit buttonis ok why in this programme use in servelt file

2325


Why doesn’t a servlet include main()? How does it work?

848


Are Servlets Thread Safe? How to achieve thread safety in servlets?

752