Table of Contents

choose JavaServer Page tag

Use the choose JSP tag to select at most one enclosed branch of when tags.

Include one or more when tags and a final otherwise tag within the scope of the choose tag.

  • If none of the when tags evaluate to true, HTML or XML text within the otherwise tag is processed.
  • For the first of the when tags that evaluates to true, HTML or XML text within that when tag is processed. Subsequent stream processing continues after the close of the choose tag.

The choose tag has no attributes. For example:

	<pega:when zzzz1 >
		<!-- HTML or XML code to execute for first when -->
	<pega:when zzzz2 >
		<!-- HTML or XML code to execute for second when -->
		<!-- selected if no previous when tag evaluates to true -->

where zzzz1 and zzzz2 are a name=, test=, or other valid set of when JSP tag attributes.

You can nest when tags within when tags. You can't use JSP tags other than when and otherwise within the scope of a choose tag.

JavaServer Page tags

Related Content

Suggest Edit
Did you find this content helpful?

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.