|
CubeTwister 2.0alpha142 2012-02-11 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectch.randelshofer.util.Cookies
public class Cookies
Usefull methods for cookies.
This class uses JSObject to access cookies of the browser through the Java-to-Javascript communication. This way the applet does not need to be signed. The applet tag must include a MAYSCRIPT attribute though.
For more information about JSObjbect see. http://java.sun.com/javase/6/docs/technotes/guides/plugin/developer_guide/java_js.html#jsobject
| Method Summary | |
|---|---|
static java.lang.String |
getCookie(java.applet.Applet applet,
java.lang.String name,
java.lang.String defaultValue)
Gets the specified cookie. |
static java.lang.String |
getEncodedCookie(java.applet.Applet applet)
Gets the raw cookie string from the HTML document which contains the applet. |
static void |
putCookie(java.applet.Applet applet,
java.lang.String name,
java.lang.String value,
java.util.Date expires)
Puts the specified cookie value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.lang.String getEncodedCookie(java.applet.Applet applet)
applet -
public static java.lang.String getCookie(java.applet.Applet applet,
java.lang.String name,
java.lang.String defaultValue)
applet - the appletname - the name of the cookiedefaultValue - the default value is returned if the cookie does not exist.
public static void putCookie(java.applet.Applet applet,
java.lang.String name,
java.lang.String value,
java.util.Date expires)
applet - the appletname - the name of the cookievalue - the value of the cookeexpires - the expiration date, specify null, for a session cookie.
|
(c) Werner Randelshofer. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||