withPage JavaServer Page tag

Use the withPage tag to replace the primary page with a different page (the base page) throughout a segment of the HTML or XML text, as a coding convenience. The new page applies only to HTML or XML code within the body of the withPage tag.


For example, the reference tag refers to property pyWorkPage. pyStatusWork :

<pega:withPage name="pyWorkPage">
	and your application status is:
	<pega:reference name=".pyStatusWork" />

Complete syntax

In the syntax presentation below:

  • JSP delimiters <pega:...> and </pega:...> mark the start and end of the tag.
  • Replace any text in italics with your choice of value of that type.
<pega:withPage name="pagename">
<!-- HTML and/or tags here with pagename as the base page -->

The name attribute is required. The page you identify must also display in the Pages & Classes tab of the current rule.

Attribute Value
name A clipboard page name, which may include the keyword $this.


  • Reference to a property of mode Page
  • $this — for the current page
  • $this.pagename — for an embedded page in the current page

About JavaServer Page tags