Thursday, July 8, 2010

Struts2 Control Tag Generator Tag Example


Struts2 Generator Tag Example

Aim:

Struts 2 generator tag is used to generate an iterator based on the “val” attribute provided in the page.

Procedure:

            Step 1:

            Create project GeneratorPro

            Step 2:

            Create Action GeneratorAction.java

            Include following coding into GeneratorAction.java

package example;
import com.opensymphony.xwork2.ActionSupport;
public class GeneratorAction  extends ActionSupport
{

    public GeneratorAction()
    {
    }

    public String execute() throws Exception
    {
        return "success";
    }

}

Step 3:

          Create jsp files

            home.jsp

No comments:

Post a Comment