top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What are different Struts2 tags? How can we use them?

0 votes
417 views
What are different Struts2 tags? How can we use them?
posted Sep 27, 2017 by Sourav Kumar

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Struts2 provides a lot of custom tags that we can use in result pages to create views for client request. These tags are broadly divided into three categories- Data tags, Control tags and UI tags.

We can use these tags by adding these in JSP pages using taglib directive.

<%@ taglib uri="/struts-tags" prefix="s" %>

Some of the important Data tags are property, set, push, bean, action, include and text tag.
Control tags are used for manipulation and navigation of data from a collection. Some of the important Control tags are if-elseif-else, iterator, append, merge, sort, subset and generator tag.
Struts2 UI tags are used to generate HTML markup language, binding HTML form data to action classes properties, type conversion and validation. Some of the important UI tags are form, textfield, password, textarea, checkbox, select, radio and submit tag.

answer Nov 6, 2017 by Frank Lee
...