File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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:

With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: data source Problem in Struts
Similar Threads
Struts VS Spring Framework
Which are Struts Tool use in This Book ?
This weeks giveaway
multiframe ???