29.01.2013 Views

WebSphere Application Server - IBM Redbooks

WebSphere Application Server - IBM Redbooks

WebSphere Application Server - IBM Redbooks

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

6.2.9 Testing<br />

We have not looked at deploying applications yet, but we will take you through<br />

the steps necessary to test the pages you just created in the Studio Site<br />

Developer test environment. This process assumes that you have not created<br />

any servers.<br />

For more explanation on creating servers and deploying applications see<br />

Chapter 13, “Deploying applications” on page 455.<br />

1. Use the instructions in 13.4.1, “Creating a server and server configuration” on<br />

page 466 to create an Express <strong>Application</strong> <strong>Server</strong> test environment.<br />

2. Use the instructions in “Defining a data source connection to the server” on<br />

page 200 to define the data source to the test server.<br />

Note: This step is not necessary if you are using the driver manager<br />

connection.<br />

3. Use the instructions in 13.4.2, “Publishing an application to the test<br />

environment” on page 468 to add the enterprise application to the server. In<br />

this example, we have been building the Online Catalog application. It is a<br />

part of the OnlineCatalogEar enterprise application.<br />

4. Use the instructions in 13.4.4, “Starting the test environment server” on<br />

page 471 to start the test server.<br />

5. Use the instructions in 13.4.5, “Running the application” on page 472 to test<br />

the Web pages. In this case, you will select SearchItemInputForm.html.<br />

Defining a data source connection to the server<br />

When you use a data source connection to a database, the data source<br />

information must be defined to the server. In this case, we need to define the<br />

data source for the SALESAPP database.<br />

1. Open the <strong>Server</strong> Configuration view in the Web perspective.<br />

2. Double-click the test server to open the configuration. Switch to the Data<br />

source tab.<br />

3. The first step is to add a JDBC provider to the configuration. This tells the<br />

server which JDBC driver class to use to access the database. Open the<br />

<strong>Server</strong> settings section and take a look at what is already defined under the<br />

<strong>Server</strong> settings section. The Cloudscape driver and data source information is<br />

predefined to support the sample applications shipped with <strong>WebSphere</strong><br />

<strong>Application</strong> <strong>Server</strong> - Express.<br />

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