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



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

Answer / 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

More Servlets Interview Questions

How can the session in servlet can be destroyed?

0 Answers  


What is servlet configuration?

0 Answers  


Name the different ways of session tracking.

0 Answers  


Can a servlet be called by passing its name as a parameter in the URL?

1 Answers   iFlex,


What is servlet tunnelling?

1 Answers  


How many ways are available to ger RequestDispatcher object?

4 Answers   Polaris,


What are the common methods that are included in the http servlet class?

0 Answers  


When Servlet is unloaded?

0 Answers  


What is servlet attributes and their scope?

0 Answers  


Some examples where generic servlet is used?

1 Answers  


how a servlet is instantiated, whether the container calls init() or by calling any other method? please somebody reply..

6 Answers   Siemens,


What is java servlet?

0 Answers  


Categories