Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Accessing data source inside Action servlet  RSS feed

 
Tad Dicks
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok I've extended the ActionServlet for a web app so I could initialize values in the servletContext from the database. How can I access the datasources that are set up in the struts-config?
I've found a method which seems to be depracated (and didn't work): getDataSource(String name);
and then I found a member called dataSources which is a "fastHashMap"
And I'm not quite sure how to get the dataSource from it. I'm only using one data source so its not "keyed".


-Tad
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!