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 the server will know its the same jsp page?

3 Answers   HCL,


What is difference between server and servlet?

0 Answers  


What is cookie in servlet?

0 Answers  


What is the use of servlet wrapper classes?

0 Answers  


Write all the phases defined in servlet life cycle?

0 Answers  






why are using HttpServlet in realtime projects and why are not using Genericservlet

2 Answers  


What is servlet container. how it works?

0 Answers  


Explain url encoding?

0 Answers  


What is war file?

0 Answers  


how JSP can extend servlet or interface ...?

3 Answers   IBM,


hi actully i hav form columns with origin and destination names .as like as i need to create one more column with name amount. my requirement is when i select origin and destination columns automatically i need to get amount from database.how can i. please tel me with relative code

0 Answers   CTS,


Why are servlets used?

0 Answers  


Categories