This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Struts and the fly likes Struts DB Error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts DB Error" Watch "Struts DB Error" New topic

Struts DB Error

Mano haran

Joined: Nov 30, 2006
Posts: 15

i am new to struts, now i exploring struts with database access,i am getting error in my datasource,
my code snippet,

String user=null;
Connection conn=null;
Statement stmt=null;
ResultSet rs=null;

ServletContext ctx=servlet.getServletContext();
DataSource ds=(DataSource)
//some other codes here
here Action.DATA_SOURCE_KEY this is giving error to me,also i have pasted my struts-config.xml data source configuration

<data-source type="org.apache.commons.dbcp.BasicDataSource">
<set-property property="driverClassName"
<set-property property="url"
value="jdbc racle:thin:@mac-0314:1521 RCL" />
<set-property property="username" value="scott" />
<set-property property="password" value="tiger" />
<set-property property="maxActive" value="10" />
<set-property property="maxWait" value="500" />
<set-property property="defaultAutoCommit" value="false" />
<set-property property="defaultReadOnly" value="false" />

please help me ...
Ramesh Satya Venkata

Joined: Jul 02, 2007
Posts: 4
please check below link
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Read quetion 7 of the JavaRanch Struts FAQ

Consultant, Sima Solutions
I agree. Here's the link:
subject: Struts DB Error
It's not a secret anymore!