User Guide

Request interface 777
Request interface
public abstract interface Request
Interface to a request made to a CustomTag. The interface includes methods for retrieving
attributes passed to the tag (including queries) and reading global tag settings.
Methods
attributeExists
Description
Checks whether the attribute was passed to this tag.
Returns True if the attribute is available; otherwise returns False.
Category
Request interface
Syntax
public boolean attributeExists(String name)
See also
getAttribute
, getAttributeList
Parameters
Example
The following example checks whether the user passed an attribute named DESTINATION to
the tag; if not, it throws an exception:
if ( ! request.attributeExists("DESTINATION") )
{
throw new Exception(
Returns Syntax Description
boolean
attributeExists(String name)
Checks whether the attribute was passed to this
tag.
boolean
debug()
Checks whether the tag contains the debug
attribute.
String
getAttribute(String name)
Retrieves the value of the passed attribute.
String[]
getAttributeList()
Retrieves a list of attributes passed to the tag.
int
getIntAttribute(String name)
Retrieves the value of the passed attribute as an
integer.
int
getIntAttribute(String name,
int def)
Retrieves the value of the passed attribute as an
integer (returns default if the attribute does not
exist or is not a valid number).
Query
getQuery()
Retrieves the query that was passed to this tag.
Parameter Description
name Name of the attribute to check (case-insensitive)