Saturday, December 02, 2006

JSTL <c:if> Tag

Tests whether an expression is true.
Taglib
: http://java.sun.com/jsp/jstl/core (Core)
Prefix: c
Attributes:
test | boolean = expression that evaluates to true or false.
var | String = variable holding the result.
scope | String = scope for var e.g. page, session, request, or application.
Example:
<c:if test="${empty param.name}" >
// Stuff to do if the expression is true
</c:if>