(Quick Reference)

Purpose

Obtains the value of a named cookie

Examples

Reading a cookie’s value:

Hello <g:cookie name="myCookie" />

Or testing for existence:

<g:if test="${cookie(name:'myCookie')}">Hello</g:if>

Description

Attributes

  • name - The name of the cookie