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
What's the difference between authentication and authorization?
How do we call one servlet from another servlet?
What is the difference between Server and Container?
Why is Servlet so popular?
What is the difference between servlet and jsp?
What is cookie in servlet?
What are the phases of the servlet life cycle?
What are the different session tracking techniques?
Explain load on start-up and its importance?
Which interface should be implemented by all servlets?
What is servlet in tomcat?
What exception should be thrown when servlet is not properly initialized?
What is http servlet in java?
What is ServletConfig object?
Why the container loads server at the application startup and how?