sreejith jithu wrote:Thanks for the replay
i checked the code their is no mismatch
here my database connection parameters is in the web.xml and iam trying to access to a servlet using servletContext
when i created an object of this srevlet from a java class i got the null pointer exception
my sevlet is as follows
According to the Servlet API:
init()... A convenience method which can be overridden so that there's no need to call super.init(config).
Without the call to super.init(config) in the init() method, any call to the GenericServlet's implementation of getInitParameter() or any other ServletConfig methods will throw a NullPointerException.
Modify your code to this:
__
or use the empty init() method version: