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.

23.Save your changes and exit the Page designer.<br />

Admin1 page<br />

To realize the admin1 Web page node, follow these steps.<br />

1. Realize the admin1.jsp page node in the same fashion that the login.jsp page<br />

node was realized.<br />

2. Once the admin1.jsp page is created and opened in Page designer, click the<br />

Source tab. Note that the Struts HTML form tag is automatically inserted into<br />

the JSP withthe action set to /logout.<br />

3. Since the admin1 page does not contain any input parameters, we do not<br />

need an HTML form tag. Remove the code associated with the HTML form<br />

tag.<br />

4. Add a message bean tag after the tag and set the key attribute to<br />

admin1.title.<br />

<br />

5. After the message bean title tag, insert the code shown in the following<br />

example.<br />

Example 12-9 Menu for admin1.jsp<br />

<br />

<br />

View<br />

Customers<br />

View<br />

Orders<br />

<br />

<br />

Ignore the two warnings indicating the broken links. We are not concerned at<br />

this point with what the menu system does, rather we simply wish to get the<br />

login function working for our site.<br />

6. Between the third set of tags, add an HTML link tag and set the<br />

href attribute to /OnlineCatalog/logout.do. This inserts a link to the Logout<br />

action which redirects the administrator to the login page. As was the case in<br />

the login.jsp page, a warning is displayed indicating that the target logout.do<br />

cannot be resolved. This will be created later in the sample.<br />

7. Between the HTML link tags, add a message bean tag and set the key<br />

attribute to logout.label.<br />

8. Verify that the code is similar to the following example.<br />

438 <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!