Struts Tags
The framework provides a tag library decoupled from the view technology. In this section, we describe each tag in general terms, such as the attributes it supports, what the behaviors are, and so forth. Most tags are supported in all template languages (see JSP Tags, Velocity Tags, and FreeMarker Tags), but some are currently only specific to one language. Whenever a tag doesn’t have complete support for every language, it is noted on the tag’s reference page.
The types of tags can be broken in to two types: generic and UI. Besides function and responsibility, the biggest difference between the two is that the HTML tags support templates and themes . In addition to the general tag reference, we also provide examples for using these generic tags in each of the support languages.s
Be sure to read the Tag Syntax document to learn how tag attribute syntax works.
FAQs
-
How can I put a String literal in a Javascript call, for instance in an onChange attribute?
-
Why does FreeMarker complain that there’s an error in my user-directive when I used JSP Tag?
-
Can an action tag run another method apart from the default execute method?
-
Why didn’t my action tag get executed when I have validation errors?
Resources
- Creating a UI Component in Struts 2 (Mark Menard)
- Struts 2 Tags (Rose India)