29.01.2013 Views

WebSphere Application Server - IBM Redbooks

WebSphere Application Server - IBM Redbooks

WebSphere Application Server - IBM Redbooks

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Within the Web diagram editor , you can add different Struts components<br />

(actions, form beans, Web pages) to create a Struts-based application. The<br />

editor also allows you to invoke wizards and editors for the different components<br />

of the Web diagram.<br />

Note: For more information on how to create a Web diagram, see “Web<br />

diagram wizard” on page 420. After a Web diagram file (*.gph) is created, you<br />

can double-click the file to open the Web diagram editor.<br />

Web diagram terminology<br />

Below is a list and description of some of the common Web diagram terms.<br />

► Free-form surface: A free-form surface (FFS) is the area of the Web diagram<br />

editor that allows you to add nodes and connections.<br />

► Node: A Web page, action mapping, bean, or form bean as represented on<br />

the free-form surface.<br />

► Module: A Struts module is a Struts configuration file and a set of<br />

corresponding actions, form beans, and Web pages. By default, a Struts<br />

application contains only one module, but more than one module can be<br />

added.<br />

► Action: A Struts action is an instance of a subclass of an Action class, which<br />

implements a portion of a Web application and the perform or execute method<br />

of which returns a forward.<br />

► Action mapping: An action mapping is a configuration file entry that, in<br />

general, associates an action name with an action. An action mapping can<br />

contain a reference to a form bean that the action can use, and can<br />

additionally define a list of local forwards that is visible only to this action.<br />

► Form bean: A form bean (type of Java bean) is an instance of a subclass of<br />

an ActionForm class that stores HTML form data from a submitted client<br />

request or that can store input data from a Struts action link that a user has<br />

clicked. To create a form bean, you must create both a form bean and a<br />

form-bean mapping.<br />

► Dynaform: A dynaform (type of form bean) is an instance of a<br />

DynaActionForm class or subclass that stores HTML form data from a<br />

submitted client request or that stores input data from a link that a user has<br />

clicked. To create a dynaform, you need create only a form-bean mapping; a<br />

form bean will be dynamically created for you at runtime.<br />

► Exceptions: A Struts exception is an element defined in a Struts<br />

configuration file that specifies how to handle Java exceptions that occur<br />

during execution of Struts actions. An exception can be local or global. Global<br />

exceptions are only available in Struts 1.1.<br />

Chapter 12. Using Struts 399

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!