Learn Java for Web Development

(Tina Meador) #1
CHAPTER 3: Best Practices in Java EE Web Development 137

The syntax for the action is as follows:



body content ( and )

As you can see, the action has two possible nested actions that form its body:
and . The syntax for each is as follows:



body


body

Table 3-15 illustrates the attributes of the action.


Table 3-15. Attributes


Name Type Description

test Boolean The test condition that determines whether the body content should be processed

Listing 3-46 illustrates a simple usage of .


Listing 3-46. Using






Number is less than 10.


Number is greater than 10.


Number is equal to 10



Here’s the output:


Number is equal to 10

Free download pdf