|
Page Created :
WICKET :
Dealing with cookies
Dealing with cookies has been created by Loren Rosen (Jan 09, 2007). Content:To send and retrieve cookies, use the WebResponse and WebRequest objects, respectively. These in turn can be obtained from the RequestCycle, which can be retrieved by calling the getRequestCycle method on a Component. Thus to create a cookie: ((WebResponse)getRequestCycle().getResponse()).addCookie(new Cookie("cookieName", "cookieValue")); and to retrieve all cookies: Cookie[] cookies = ((WebRequest)getRequestCycle().getRequest()).getCookies();
|
Powered by
Atlassian Confluence
(Version: 2.2.9 Build:#527 Sep 07, 2006)
-
Bug/feature request
Unsubscribe or edit your notifications preferences
Unsubscribe or edit your notifications preferences
