|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.servlet.jsp.tagext.TagSupport
com.ecyrd.jspwiki.tags.CookieTag
public class CookieTag
Sets or gets Cookie values. This implementation makes the following assumptions:
The value of a cookie carrying values n1="v1" and n2="v2 with space" would thus be
n1%3Dv1&n2%3Dv2%20with%20space
Usage:
<wiki:cookie name="cookiename" var="contextvariable" scope="page" />- Returns the value of the named cookie, or an empty string if not set. If 'var' is specified, the value is set into a context variable of this name. The 'scope' parameter may be added to specify the context: "session", "page", "request". If var is omitted, the output is placed directly into the JSP page.
<wiki:cookie name="cookiename" value="encoded_value" />- Sets the named cookie to the given value. If the value string is empty, the cookie value is set to empty; otherwise the cookie encoding rules of this class must be followed for the value.
<wiki:cookie name="cookiename" item="parameter_name" />- Assumes that the cookie contains URLEncoded name-value pairs, with name and value separated by an equals sign, and returns the value of the specified item. <wiki:cookie name="cookiename" item="parameter_name" value="value" /> - Sets the value of 'parameter_name' in the named cookie to 'value'.
<wiki:cookie name="cookiename" clear="parameter_name" />- Removes the named parameter from the cookie.
<wiki:cookie clear="cookiename" />- Removes the named cookie. Clear may be used at the same time as a value is retrieved (or set, despite the dubious usefulness of that operation).
| Field Summary |
|---|
| Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
|---|
id, pageContext |
| Fields inherited from interface javax.servlet.jsp.tagext.IterationTag |
|---|
EVAL_BODY_AGAIN |
| Fields inherited from interface javax.servlet.jsp.tagext.Tag |
|---|
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE |
| Constructor Summary | |
|---|---|
CookieTag()
|
|
| Method Summary | |
|---|---|
int |
doEndTag()
|
void |
release()
|
void |
setClear(String s)
Set the "clear" parameter. |
void |
setItem(String s)
Set the "item" parameter. |
void |
setName(String s)
Set the "name" parameter. |
void |
setScope(String s)
Set the "scope" parameter. |
void |
setValue(String s)
Set the "value" parameter. |
void |
setVar(String s)
Set the "var" parameter. |
| Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
|---|
doAfterBody, doStartTag, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CookieTag()
| Method Detail |
|---|
public void setName(String s)
s - The name.public void setItem(String s)
s - The item.public void setValue(String s)
s - The value.public void setVar(String s)
s - The parameter.public void setClear(String s)
s - The parameter.public void setScope(String s)
s - The scope.public void release()
release in interface Tagrelease in class TagSupportpublic int doEndTag()
doEndTag in interface TagdoEndTag in class TagSupport
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||