Meaningless Drivel is fun!*
The moose likes Struts and the fly likes Mysql connection causes 404 error 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 "Mysql connection causes 404 error " Watch "Mysql connection causes 404 error " New topic
Author

Mysql connection causes 404 error

sunny an
Greenhorn

Joined: Feb 27, 2012
Posts: 1
When i setup mysql connection, it gives me 404 error. when i delete this connection, every things work fine.
my db setup like below;

<!-- ============================================ Data Source Configuration -->

<data-sources>
<data-source type="org.apache.commons.dbcp.BasicDataSource" key="gbook">
<set-property
property="driverClassName"
value="com.mysql.jdbc.Driver" />
<set-property
property="url"
value="jdbc:mysql://localhost:3306/gbook" />
<set-property
property="username"
value="root" />
<set-property
property="password"
value="*****" />
<set-property
property="maxActive"
value="10" />
<set-property
property="maxWait"
value="5000" />
<set-property
property="defaultAutoCommit"
value="true" />

</data-source>
</data-sources>
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8839
    
    7

Welcome to the JavaRanch.
Data sources were retired after Struts 1.2. It didn't make sense to configure database functionality in Struts, which is technically an implementation of the Front Controller pattern. See Struts: How to Access a Database.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Mysql connection causes 404 error
 
Similar Threads
Error in data source definition in struts-config.jar
Struts, DBCP weird problem
more than one data-source in Struts
Connect to MSSQL Server
Struts+mySQL+JBoss configuration