This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Customer Requirements for Developers and have Marcho Behler on-line!
See this thread for details.
The moose likes Struts and the fly likes DB2 DataSource for Struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Customer Requirements for Developers this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "DB2 DataSource for Struts" Watch "DB2 DataSource for Struts" New topic

DB2 DataSource for Struts

Laura Lee

Joined: Jan 23, 2005
Posts: 2
Dear All,
I am using WSAD to implement a Struts web app, with DB2 as database.
I am not sure what <data-source>'s type and driverClassName I should define/use for DB2 connection within struts-config.xml file.

Your tips is greatly appreciated,

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63060

Moving to the Struts forum.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
John Ackerman

Joined: Jun 04, 2004
Posts: 9

I am new to Struts but the commented settings below will work on an iSeries. The AS400JDBCDriver should work from anywhere while the DB2Driver only works if you are running on the iSeries.


<set-property property ="driverClass"
value = "com.mysql.jdbc.Driver" />
<!-- value = "" /> -->
<!-- value = "" /> -->
<set-property property ="url"
value = "jdbc:mysql://localhost/ccllc"/>
<!-- value = "jdbc:as400://"/> -->
<!-- value = "jdbc:db2:*local"/> -->
[ January 26, 2005: Message edited by: John Ackerman ]
I agree. Here's the link:
subject: DB2 DataSource for Struts
It's not a secret anymore!