In this section, we are going to describe the include tag. The include tag is a generic tag that is used to include a servlet's output (result of servlet or a JSP page) to the current page. Add the following code snippet into the struts.xml file. struts.xml <action name="includeTag" class="net.roseindia.includeTag"> <result name="success">/pages/genericTags/includeTag.jsp</result> </action> Create an action class as shown below: includeTag.java package net.roseindia; import com.opensymphony.xwork2.ActionSupport; import java.util.*; public class includeTag extends ActionSupport { private Date myBirthday; public String execute() throws Exception{ setMyBirthday(new Date("Jan 12, 1984 11:21:30 AM")); return SUCCESS; } ...
Archive of Struts 2 examples with tag, script. This is the best tutorial of struts 2 framework.