Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to get the datasource value  RSS feed

 
Maheswaran Devaraj
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
regards,
Maheshwaran Devaraj
 
Joe Ess
Bartender
Posts: 9425
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Struts is not the right tool to use to access a database. This Struts FAQ entry tells you why.
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!