Skip to main content

         This documentation site is for previous versions. Visit our new documentation site for current releases.      

Text File rules

Updated on August 16, 2022

Use a text file rule to hold and identify static HTML, XML, Cascading Style Sheet, DHTML, and JavaScript script files used in an application. This rule provides the security, inheritance versioning, and deployment benefits of rule resolution to the file. (A static file in this context is one that does not change each time it is served. The contents of static files may differ from RuleSet version to RuleSet version, and may be updated after a Rule-File- rule is updated.)

The following tabs are available on this form:

A text file rule containing HTML must define an entire static page with pure HTML, containing no reference to the Pega Platform JSP tags or directives. In contrast, an HTML Fragment rule can contain JSP tags or directives.

Where referenced

Any rule type that contains XML or HTML code can reference a text file rules, using the pega:include JSP tag.

In addition, text file rules for styles (CSS) or JavaScripts (JS) can be referenced in a static content bundle rule ( Rule-File-Bundle ) to reduce the number of HTTP interactions between a browser session and the Pega Platform server. Such text file rules can also be included in a static content bundle with the static JSP tag.

The first time a requestor asks for this text file, the Pega Platform extracts the text file from the rule into an appropriate Web server directory on the server.


Use the Records Explorer to list all text file rules available to you.


Text file rules are instances of the Rule-File-Text class. They are part of the Technical category.

  • Previous topic Static Content Bundle rules - Completing the Definition tab
  • Next topic Text File rules - Completing the Create, Save As, or Specialization form

Have a question? Get answers now.

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

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best. is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us