The Apache Struts 2 framework provide a lot of default custom tags and its library that we can use in JSP pages to get the application data from ValueStack as well as from request, session or application scope attributes. You need not write any HTML code, the struts tags will automatically generate them for you based on the theme you select. By default the XHTML theme is used. The XHTML theme uses tables to position the form elements.
Struts tags can be divided into 5 categories –
Check into the Struts2 Data tags and how we can use them in JSP pages. We need to import Struts 2 tag libraries in JSP pages to use them through taglib directive.
Control Tags |
|
Data Tags |
|
---|
Form Tags |
|
Non-Form UI Tags |
|
Ajax Tags |
|
---|