This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Accessing DataSource From Struts" Watch "Accessing DataSource From Struts" New topic
Author

Accessing DataSource From Struts

Praful Thakare
Ranch Hand

Joined: Feb 10, 2001
Posts: 614
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
-Praful


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

Joined: Feb 05, 2001
Posts: 17249
    
    6

Moving this to the Struts forum.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
Consider Paul's rocket mass heater.
 
subject: Accessing DataSource From Struts
 
Similar Threads
Where to define datasource for servlets?
DataSource in stand alone application
How do i get a connection object in a java class ; am using struts datasource
mysql connectivity failure
[Urgent] How to configure Datasource externally