Create Struts Web pages

ZIETrans enables you to use Struts 2 to build Web pages based on Integration Objects.

In the ZIETrans Projects view, right click on the name of an Integration Object and select Create Struts Web Pages. Specify names for input and output pages, or accept the default names created from the Integration Object name. Click Finish.

When you create Struts Web pages, ZIETrans generates following new files:
Struts Action class
This class is the main class. It instantiates the Integration Object, sets the Integration Objects properties using values in the ActionForm class, sets the Integration Object's poolname, and runs the Integration Object. It then forwards to the output JSP, or if there is an error, then it returns to the ZIETrans runtime and allows the ZIETrans runtime to handle the error. The developer should not modify this class. This file is located in the Source/Struts/Actions folder in your project.
ActionForm class
This class contains setters and getters for each input in the input JSP. The input JSP submits to the Struts Servlet, which instantiates the ActionForm class and sets all of its properties based off the submitted input JSP form. This class is used by the Action class to set all of the Integration Objects properties. If you add or remove input properties from the input JSP, you must add or remove the matching setters and getters from this file. This file is located in the Source/Struts/ActionForms folder in your project.
input JSP
The input JSP contains a Struts HTML form that sends the request to the Struts Controller, which creates an ActionForm and forwards the request to appropriate Action class. If the Integration Object does not need any input, or where the inputs come from different sources, such as global variables, an empty input JSP is created containing only the HTML form. The input page is created in the Web Content/Struts Pages folder. To test your pages, run the link http://<hostname>:<port>/<contextRoot>/<StrutsActionClassName>.action in the browser.
output JSP
The output JSP displays the Integration Object's output properties. This page is similar to the Model 1 output JSP. This file is located in the Web Content/Struts Pages folder in your project.
ZIETrans also adds or updates an action to the struts.xml file to associate the Action class with the input/output/error pages.
Note: When you create Struts pages, if Struts is not already installed in your project, ZIETrans installs it and creates struts.xml file under source folder of your project.