Struts 2 Tags
In this section we will introduce you with the tags provided along with Struts 2 framework. It is necessary to understand all the tags provided along with Struts 2 framework. In this page we will have listed all the Struts 2 Tags and in subsequent sections we will provide you the examples of the these tags in detail.
The Struts 2 Tags can be divided into two types:
- Struts Generic Tags
The struts generic tags are used to control the execution flow when pages are rendered. Another use of struts generic tags are data extraction.
Further Generic Tags are classified into Control Tags and Data Tags.
Control Tags: The Control Tags are used for flow control, such as if, else and iterate.
Here are the list of Control Tags:
* if
* elseIf
* else
* append
* generator
* iterator
* merge
* sort
* subset
Data Tags: The Data Tags are used for data manipulation or creation, such as bean, push, and i18n.
Here are the list of Data Tags:
* a
* action
* bean
* date
* debug
* i18n
* include
* param
* push
* set
* text
* url
* property
- Struts UI tags
Struts UI Tags are mainly designed to use the data from your action/value stack or from Data Tags. These tags are used to display the data on the HTML page. The UI tags are driven by templates and themes.
Struts UI Tags are of two types Form Tags and Non - Form tags.
Form Tags are as follows:
* autocompleter
* checkbox
* checkboxlist
* combobox
* datetimepicker
* doubleselect
* head
* file
* form
* hidden
* label
* optiontransferselect
* optgroup
* password
* radio
* reset
* select
* submit
* textarea
* textfield
* token
* updownselect
Non-Form UI Tags are:
* actionerror
* actionmessage
* component
* div
* fielderror
* table
* tabbedPanel
* tree
* treenode
The main difference between Struts Generic Tags and Struts UI Tags are:
- The generic tags simply output some content directly from the tag while the UI tags uses templates and often group the output together with theme