File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
Author

data source Problem in Struts

s. anitha
Greenhorn

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
Greenhorn

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

<data-sources>
<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" />
</data-source>
</data-sources>

Maybe this would help, too:
http://struts.apache.org/faqs/database.html

Klaus
 
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 ???
JSF 0R JSTL 0R STRUTS???