aspose file tools*
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 Spring in Action this week in the Spring 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