Skip to main content


Text File rules

Suggest edit Updated on August 18, 2021

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.

Did you find this content helpful? YesNo

Have a question? Get answers now.

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

Ready to crush complexity?

Experience the benefits of Pega Community when you log in.

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