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.

5. Type the name of the new Struts module and change any defaults as desired<br />

by selecting the Override default settings option.<br />

– Deselecting the Create module directory option will not create a module<br />

directory in the WebContent directory of your Web project.<br />

– If you wish to change the name of the Struts configuration file, you can, but<br />

it is recommended that you leave the default value since it includes the<br />

module name you specified and can easily been recognized if you are<br />

looking for it.<br />

– Deselect the Create a Resource Bundle for the Struts Project option if<br />

you do not want to create a resource bundle for the module.<br />

A Resource bundle contains locale-specific objects. For example, a<br />

Resource bundle could include a properties file that contains the label text<br />

for all the buttons in your application. Instead of hard-coding the text onto<br />

the buttons, you can call the values from the properties file. This is very<br />

beneficial if you ever want to change the language of your application.<br />

– You can change the name of the Resource bundle Package if you like, but<br />

again, it is best to leave the default value since it contains the module<br />

name you specified and can be easily recognized if required.<br />

– Editing the value in the Resource bundle Name field will change the name<br />

of the default application resources properties file.<br />

Note: When the Create a Resource Bundle for the Struts Project<br />

option is selected, a properties file called<br />

<strong>Application</strong>Resources.properties is created and placed in the Web<br />

Content/WEB-INF/classes//resources directory. This<br />

file is read by the Struts framework at runtime.<br />

In this file, it is possible to specify properties which can be used by your<br />

application. For example, you could create a property called page.title<br />

and specify the value as “My New Page”. This property could be used in<br />

a page called page.jsp to set the page title. This is potentially beneficial<br />

if you ever want to change the language of your application.<br />

6. Click Finish. A Struts configuration file is created.<br />

Web diagram wizard<br />

To create a Web diagram, complete the following steps:<br />

1. In the Project Navigator, select the name of a project.<br />

2. Right-click and select the following menu path: New -> Other -> Web -><br />

Struts -> Web Diagram.<br />

420 <strong>IBM</strong> <strong>WebSphere</strong> <strong>Application</strong> <strong>Server</strong> - Express V5.0.2 Developer Handbook

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

Saved successfully!

Ooh no, something went wrong!