Back Forward Introducing JavaServer Page tags

JavaServer Pages tags

CautionFor highest quality and security, minimize the use of hand-crafted stream rules (such as HTML rules, XML rules, HTML fragments, and non-autogenerated section rules) you create in application RuleSets. While hand-crafted, non-auto-generated rules are necessary for specific features, use of auto-generated section rules in flow action rules and harness rules is preferable when possible. Auto-generated rules may often provide better performance, greater security, greater levels of browser independence, and more consistent branding and styles than hand-crafted rules. If your application RuleSets contain HTML rules, use the Application Preflight report to assess guardrail compliance, and use the Rule Security Analyzer to check for security vulnerabilities.

The Process Commander JSP tag library contains about twenty tags. You can use these tags in all stream rule types, including correspondence, XML Stream rules, and user interface rules. Q-1736

Syntax basics

JavaServer Page tags are well-formed XML elements. Close each tag with a corresponding, correctly nested close tag (/). For example:

<pega:choose>
<!-- additional HTML, XML, and JSP tags here -->
</pega:choose>

Some tags can be self-closing, for example:

<pega:reference name=".pyIndex" />

Each tag in the Process Commander tag library begins with the pega: prefix, except for the r tag, which begins with a p: prefix.

To work with

Use these tags

Properties

Use these tags to work with properties.

  • reference — insert a property value for a property on the clipboard
  • lookup — insert a property value for a property not on the clipboard
  • withEmbedded — set the current embedded page
  • withPage — change the base page
  • withTarget — override the HTML Property rule that controls presentation
  • withReference — override the current active property
HTML fragments or other HTML rules

Use the include tag and the onlyonce tag.

Anchors, FORM tags, and SUBMIT buttons

Consider the url tag.

Conditional processing

Use the when tag and the choose tag.

Iteration and looping

Use the forEach tag.

Output of a list view rule

Use the listView tag.

Static file bundles

Use the static tag, which can contain bundle, binaryfile, and file tags.

Drop-down lists for a text box value in a form

Use the autoComplete tag, which contains an acDataSource tag and may contain dsFields and dsField tags.

Static images

Use the contentURL tag.

Inline Java

Use the normal brackets <% and %> to enclose one or more executable Java statements (a scriptlet) within a JSP stream: CLINB 7/27/05

<p>So he said to me <% if(!hasError) {try .... }
                         catch (Exception e) { ..} %> is great.

Use the <%= and %> brackets when calling a function or returning a value such as a string to be inserted into the stream:

<p>Your last payment is due on <%= payoffdate(360, mon).toString() %>.

Comments

Within a JSP tag, you can use the standard JSP comment delimiters <%-- and --%> to mark material that is to be ignored as a comment. B-21620

Similarly, JSP tags within the Java <% and %> delimiters or <%= and =%> delimiters is ignored during JSP processing.

Definitions guardrails, Jasper, Rule Security Analyzer,stream rule types
Related topics JavaServer Page tags
Converting from directives to JavaServer Pages

More about JavaServer Page tags

JavaServer Pages tagsAbout JavaServer Page tags