aspose 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
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: data source Problem in Struts