Meaningless Drivel is fun!
The moose likes Struts and the fly likes data source Problem in Struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "data source Problem in Struts" Watch "data source Problem in Struts" New topic

data source Problem in Struts

s. anitha

Joined: Jan 18, 2005
Posts: 18
please give sample code for connecting mysql and struts using datasource> tag

plz help me

thanks in advance
Klaus Jesper

Joined: Jan 20, 2005
Posts: 15
Just an example, should work:

<data-source type="org.apache.commons.dbcp.BasicDataSource">
<set-property property="driverClassName" value="com.mysql.jdbc.Driver" />
<set-property property="url" value="jdbc:mysql://localhost:3306/testDB" />
<set-property property="username" value="testuser"/>
<set-property property="password" value="testPW" />

Maybe this would help, too:

I agree. Here's the link:
subject: data source Problem in Struts
It's not a secret anymore!