Apache Struts 2 Documentation > Home > FAQs > Can we use JSTL with the framework
Added by Patrick Lightbody, last edited by Dave Newton on Jun 27, 2007  (view change) show comment
About JSTL
The JavaServer Pages Standard Tag Library (JSTL) encapsulates as simple tags the core functionality common to many Web applications. JSTL has support for common, structural tasks such as iteration and conditionals, tags for manipulating XML documents, internationalization tags, and SQL tags.

JSTL integration is built into the framework - there are no steps required to enable it. Simply refer to your JSTL expressions just as you would with a normal SAF JSP tag, such as the property tag.


Javadoc: (org.apache.struts2.dispatcher.StrutsRequestWrapper)

All Struts requests are wrapped with this class, which provides simple JSTL accessibility. This is because JSTL works with request attributes, so this class delegates to the value stack except for a few cases where required to prevent infinite loops. Namely, we don't let any attribute name with "#" in it delegate out to the value stack, as it could potentially cause an infinite loop. For example, an infinite loop would take place if you called: request.getAttribute("#attr.foo").