aspose file tools*
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 Spring in Action 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: 639
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: 17257

Moving this to the Struts forum.


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
wood burning stoves
subject: Accessing DataSource From Struts