FileDocCategorySizeDatePackage
GetCookieValueTag.javaAPI DocExample1317Thu Jun 28 16:14:16 BST 2001com.ora.jsp.tags.generic

GetCookieValueTag

public class GetCookieValueTag extends TagSupport
This class is a custom action for writing the value of a cookie to the response.
author
Hans Bergsten, Gefion software
version
1.0

Fields Summary
private String
name
Constructors Summary
Methods Summary
public intdoEndTag()
Writes the specified cookie value to the output stream, or an empty string if not found.

        String value =
            CookieUtils.getCookieValue(name, 
                (HttpServletRequest) pageContext.getRequest());
        if (value == null) {
            value = "";
        }
        try {
            pageContext.getOut().write(value);
        }
        catch (IOException e) {} // Ignore it
        return EVAL_PAGE;
    
public voidrelease()
Releases all instance variables.

        name = null;
        super.release();
    
public voidsetName(java.lang.String name)
Sets the cookie name attribute.

param
name the name of the cookie

        this.name = name;