Developing Cooperating Actions
It’s often necessary
to develop custom actions so
that they can be combined with other actions, letting them cooperate
in some fashion. You have seen examples of this throughout this book.
For instance, in Chapter 12,
<sql:param> action elements are nested
within the body of a <sql:query> action to
set the values of placeholders in the SQL statement. Another example
of cooperation is how the <c:forEach> action
can use the query result produced by the
<sql:query> action. In this section, we take
a look at the cooperation techniques demonstrated by these two
examples: explicit cooperation between a parent element and elements
nested in its body and implicit cooperation through objects exposed
as scoped variables.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access