Overview | Library | Tag | Help
| FRAMES NO FRAMES

## bean
Tag cookie

Define a scripting variable based on the value(s) of the specified request cookie.

Retrieve the value of the specified request cookie (as a single value or multiple values, depending on the `multiple` attribute), and define the result as a page scope attribute of type `Cookie` (if `multiple` is not specified) or `Cookie[]` (if `multiple` is specified).

If no cookie with the specified name can be located, and no default value is specified, a request time exception will be thrown.

Tag Information
Tag Class | org.apache.struts.taglib.bean.CookieTag
TagExtraInfo Class | org.apache.struts.taglib.bean.CookieTei
Body Content | empty
Display Name | None

Attributes
Name | Required | Request-time | Type | Description
id | true | false | `java.lang.String` | Specifies the name of the scripting variable (and associated page scope attribute) that will be made available with the value of the specified request cookie.
multiple | false | true | `java.lang.String` | If any arbitrary value for this attribute is specified, causes all matching cookies to be accumulated and stored into a bean of type `Cookie[]`. If not specified, the first value for the specified cookie will be retrieved as a value of type `Cookie`.
name | true | true | `java.lang.String` | Specifies the name of the request cookie whose value, or values, is to be retrieved.
value | false | true | `java.lang.String` | The default cookie value to return if no cookie with the specified name was included in this request.

Variables
| No Variables Defined.

Overview | Library | Tag | Help
| FRAMES NO FRAMES

Output Generated by Tag Library Documentation Generator. Java, JSP, and JavaServer Pages are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries. Copyright 2002-4 Sun Microsystems, Inc. 4150 Network Circle Santa Clara, CA 95054, U.S.A. All Rights Reserved.