Is that the complete stack trace? That looks as if the code is not running as part of a web app; is it? If not, then there will indeed not be a JNDI context to use - standalone applications don't have one unless you set it up as described in http://java.sun.com/products/jndi/tutorial/beyond/env/context.html
I just noticed that the Java code you posted earlier contains a comment " // Here am getting Null Pointer Exception." - so are you in fact getting an exception? If so, which object is null?
Does your last post mean that the HTML page is completely blank? Of just that some parts of the JSP page that you thought should get executed are not in fact executed, and that the rest of the JSP created HTML output just fine? TellTheDetails
Ramesh Sunkara wrote:"the rest of the JSP created HTML output is just fine"-- exaclty this is happening in my case.
OK, finally you're starting to tell us the details. But we still don't know if there is or is not an exception happening anywhere along the code path ... is there? If so, which one? In which line of code? If it's a NPE, which object is null? Etc. etc.
I am ready to tell all the details required. The reason why I didn't pasted all my code is I thought of giving only relevant code. So that .it saves time of who helps me.
Am not "getting any output" displayed in my JSP which I retrieved from DB. When I used plain DB conncetion without using connection pool everything worked fine.
Since I am not getting any output displayed, I checked log file tomact/logs/ I found the "NullPointerException at line:53" Which i commented in my post