• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

cannot access struts datasource

 
jim bee
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 264
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for that
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic