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

Getting a connection object in a businesslogic class (outside Action class)

 
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
HI,

I am developing astruts based application.In the application I am using three classes
1. Regular Insert_Action(which extends ACTION) class which calls compute() method of Business_Logic object .

2.The Business_Logic class calls a method(getDataSource( HttpServletRequest request) in the DbConnection class.


2. DbConnection class (Which extends ACTION )contains a method
getDataSource(request ).

But In my application , I am not getting the connection from getConnection() method of the DbConnection class, it is flashing NullPointerException when it calls the getDataSource(request) method in the DbConnection object.


Regards
Sharanagouda
 
author & internet detective
Posts: 41878
909
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
This looks like your other thread. Please see response there.

In the future, try to keep related or very similar questions in one thread. This makes it easier for people to follow responses and help you.
 
Lasagna is spaghetti flvored cake. Just like this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
    Bookmark Topic Watch Topic
  • New Topic