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 cannot access struts datasource 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 "cannot access struts datasource" Watch "cannot access struts datasource" New topic
Author

cannot access struts datasource

jim bee
Greenhorn

Joined: Nov 30, 2004
Posts: 2
hello all, I know this gets asked here a lot but none of the posts I've read have helped...I am making my first struts app, and want to use DBCP & the datasource manager...this is from struts-config.xml

(I know the url, username etc are correct). In my Action class I have this code (mainly from http://struts.apache.org/faqs/database.html)

but the ResultSet is null and I'm not sure how to debug it cos I can't work out where the calls to getServlet().log(...) go - anybody got any ideas?

Thanks!
Tad Dicks
Ranch Hand

Joined: Nov 16, 2004
Posts: 264
I think that when you call getDataSource(), you don't want to put any arguments in there unless you are using multiple datasources and have keys associated to them. Otherwise just call getDataSource().


-Tad
jim bee
Greenhorn

Joined: Nov 30, 2004
Posts: 2
thanks for that
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: cannot access struts datasource
 
Similar Threads
Unable to connect Oracle Database
struts with jdbc example
How to get the datasource value
Accessing context params from an Action class
struts mysql ...Help