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.

Item number has been added!<br />

Do you wish to add additional items<br />

or would you like to return to the site<br />

administration function menu?<br />

<br />

In our sample, we use the following line of code to include a file into our JSP. This<br />

file contains the database connection information and is referenced by the<br />

connectionSpec parameter in the dab tags.<br />

<br />

We did not hard-code the connection information into the JSP because we were<br />

concerned with session data issues related to our Wishlist feature of the site. If<br />

we had inserted the connection information into the JSP, we would have lost the<br />

connection parameters when the wishlist page was viewed. This occurs because<br />

we remove the database session object from the wishlist page. The wishlist page<br />

simply uses session attributes to display the users item selections.<br />

Chapter 8. Working with JSPs 273

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

Saved successfully!

Ooh no, something went wrong!