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
A client sends requests to two different web components. Both of the components access the session. Will they end up using the same session object or different session ?
How to get the current httpsession object?
What are some disadvantages of storing session state in cookies?
Explain the concept of ssi ?
What’s the difference between genericservlet and httpservlet?
What is the difference between the http servlet and generic servlet?
What is a java servlet?
What is the purpose of inter-servlet communication?
How can we achieve transport layer security for our web application?
What is servlet configuration?
What is the use of java servlet api?
What is new in ServletRequest interface ? (Servlet 2.4)
Explain the difference between jsp and servlet?
What are the benefits of using servlet over cgi?
What is servlet and its types?