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.

To access the DB Output view:<br />

1. Click Window > Open Perspective > Other to open the Select Perspective<br />

window.<br />

2. Select Data and then click OK to open the Data perspective.<br />

3. Click the DB Output tab on the Tasks view to display the DB Output view.<br />

Figure 6-16 DB output view<br />

To view the sample contents of a table, navigate to a table definition in the DB<br />

servers view, right-click the table definition and select Sample contents from the<br />

context menu. The table contents will be displayed in the DB output view as<br />

shown above.<br />

6.2.6 Creating Web pages to access the database<br />

The Database Web Pages wizard provides an easy way to quickly create a<br />

simple HTML form to solicit user input and JSP pages that show the database<br />

access results. This set of pages can then be modified or customized later. This<br />

saves a lot of initial repetitive work. In this section we will use the wizard to create<br />

Web pages that search the database for a record based on user input.<br />

There are two approaches to using this wizard.<br />

► You can create the pages and assume that you will use them as the basis for<br />

the real pages in the application. This implies that you will probably rename<br />

the pages created to a naming convention that suits your project, and that you<br />

will update the generated code to customize the look and feel for your<br />

application or to add additional functions.<br />

► Or you can create the pages in an out-of-the-way location, for example, a<br />

folder that is not in the Web Content directory structure. You can open these<br />

pages and copy/paste relevant code into pages that you create for the<br />

application. By placing the wizard-generated pages somewhere other than<br />

the Web Content directory, you can prevent them from being deployed to the<br />

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