16.10.2015 Views

Getting Started with WebSphere Application Server

Create successful ePaper yourself

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

Chapter 4 – Working <strong>with</strong> databases 81<br />

<br />

<br />

<br />

}<br />

<br />

<br />

<br />

Listing 4.7 HTML code snippet to present the retrieved data<br />

f) Finally, don’t forget to close the database access objects in your code, so that the<br />

database connection object is returned to the connection pool, and is available for<br />

other clients to call.<br />

<br />

Listing 4.8 – Code snippet to close database objects.<br />

The complete JSP code is shown in Listing 4.9.<br />

<br />

<br />

<br />

<br />

<br />

<br />

DBDemo<br />

<br />

<br />

<br />

<br />

<br />

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

Saved successfully!

Ooh no, something went wrong!