[OmniFaces utilities] The
removeResponseCookie() method remove the cookie with given name and path from the HTTP response. Note that the name and path must be exactly the same as it was when the cookie was created.Method:
See also: Faces#getContext() | Faces#getRequestHostname() | Utils#encodeURL()
Usage:
Add a cookie
with given name, value, path and maxage to the HTTP response.
import
org.omnifaces.util.Faces;
...
// session
cookie with explicit path
Faces.addResponseCookie("favorite_game",
"Time Gap", "/mypath", -1);
Remove this
cookie:
import
org.omnifaces.util.Faces;
...
Faces.removeResponseCookie("favorite_game",
"/mypath");







JSF 2 Tutorials at www.mkyong.com
JavaServer Faces (JSF) Tutorial 

















Niciun comentariu :
Trimiteți un comentariu