wood burning stoves 2.0*
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 Android Security Essentials Live Lessons this week in the Android 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: 8839

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

"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[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: http://aspose.com/file-tools
subject: How to get the datasource value
Similar Threads
Query about datasource
struts with jdbc example
cannot access struts datasource
No action servlet available.
Accessing context params from an Action class