This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Struts and the fly likes How to get the datasource value Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to get the datasource value" Watch "How to get the datasource value" New topic

How to get the datasource value

Maheswaran Devaraj
Ranch Hand

Joined: Sep 14, 2007
Posts: 47
Hi all,

I'm using struts1.3.8 version.I wrote the following code to access the mysql database. But in the following line it is showing error.

datasource = getDataSource(request);

Error : getDataSource method undefined.

How can i resolve this problem
Maheshwaran Devaraj
Joe Ess

Joined: Oct 29, 2001
Posts: 9191

Struts is not the right tool to use to access a database. This Struts FAQ entry tells you why.

[How To Ask Questions On JavaRanch]
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Not only is it a bad practice to use Struts to access your database, in version 1.3.8, it's not even possible. The Struts datasource utility that was available in previous versions has been removed from version 1.3.8.

Consultant, Sima Solutions
I agree. Here's the link:
subject: How to get the datasource value
It's not a secret anymore!