• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

cannot access struts datasource

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks for that
 
reply
    Bookmark Topic Watch Topic
  • New Topic