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.

► A design tool to edit a graphical view of the Web application from which<br />

components (forms, actions, JSPs) can be created using the wizards. This<br />

graphical view is called a Web diagram. The Web diagram editor provides<br />

top-down development (developing a Struts application from scratch),<br />

bottom-up development (that is, you can easily diagram an existing Struts<br />

application that you may have imported) and meet-in-the-middle development<br />

(that is, enhancing or modifying an existing diagrammed Struts application).<br />

► A Web Structure view that provides a hierarchical (tree-like) view of the<br />

application. This view shows the artifacts, such as Web pages and actions,<br />

and you can expand the artifacts to see their attributes. For example, an<br />

action can be expanded to see its forwards, which can then be expanded to<br />

see its links. This is useful for understanding specific execution paths of your<br />

application. The Web Structure view is available in the Web perspective.<br />

► Page Designer support for rendering the Struts tags, making it possible to<br />

properly view Web pages that use the Struts JSP tags. This support is<br />

customizable using the preferences settings.<br />

► Validators to validate the Struts XML configuration file and the JSP tags used<br />

in the JSP pages.<br />

12.2.1 Struts development process<br />

You would typically set up and use Struts in an application in the following<br />

manner:<br />

1. Create a new project with Struts support.<br />

If you have an existing project, you must add Struts support to the project.<br />

2. Use wizards to:<br />

– Draw a Struts application Web diagram to visually model the application<br />

flow.<br />

– Develop the JSPs in the Web diagram using the custom Struts HTML and<br />

bean tags.<br />

– Generate templates for ActionForm and action mapping classes and<br />

modify them to add the business logic.<br />

– Edit the Struts configuration file to map actions to Web pages and vice<br />

versa.<br />

12.2.2 Struts support in a Web project<br />

By default, Struts support is not added to a project in Studio Site Developer.<br />

Support can be added when creating a new project and can also be added to an<br />

existing project by modifying the project properties.<br />

Chapter 12. Using Struts 389

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

Saved successfully!

Ooh no, something went wrong!