jQuery in Action, 3rd edition
The moose likes Struts and the fly likes Accessing DataSource From Struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Accessing DataSource From Struts" Watch "Accessing DataSource From Struts" New topic

Accessing DataSource From Struts

Praful Thakare
Ranch Hand

Joined: Feb 10, 2001
Posts: 641
Hi All,

We have an Application build in struts, but therez an odd HttpServlet which
dose some database activity, and I need to access the datasource which I am using for entire application thru Action class as

DataSource = this.getDataSource(request,"dsname");

kindly help me out in this.

One way I know is making Instance of ActionClass in my servlet and calling this method, but dough if its a efficient way to do so.

Warm Regards

All desirable things in life are either illegal, banned, expensive or married to someone else !!!
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

Moving this to the Struts forum.


Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
subject: Accessing DataSource From Struts
It's not a secret anymore!