Wednesday, April 27, 2005

The Example JavaServer Faces Application

The JavaServer Faces technology chapters of this tutorial primarily use a rewritten version of the Duke's Bookstore example to illustrate the basic concepts of JavaServer Faces technology. This version of the Duke's Bookstore example includes several JavaServer Faces technology features

this example application needs bookstore6 and also some stuff from the bookstores source.

when I initially ran the bookstore6 six example on tomcat, I got an error because the app could not connect to the database.

The documentation included with the examples talks about setting up the pointbase database server. What I did instead was create a file in a library on the as400. This was based on the script from the examples\web\bookstore folder. I had to make a couple of changes to make it work:

added the relevant library to my library list (top)
FLOAT became dec(11,2)
BOOLEAN bacame 1A and either 'Y' or 'N'

I then configured the datbase url in the tomcat context

username="myuser" password="mypassword"
driverClassName="com.ibm.as400.access.AS400JDBCDriver"
url="jdbc:as400://www.mysystem.com;naming=system;trace=true;libraries=mylib;"
maxActive="8" maxIdle="4"/>

and shazam. bookstore6 example running at home with an as400 database!


No comments:

Post a Comment