Tim and Leo,
Thanks for the comments. I was unable to fix it and I used the bad practice to create a new connection everytime, but I have to finish my exercise on schedule so skipped using the pooled connections. But, yes I want to get involved to know the industry level practices. Lately I have been looking at setting up the tomcat and subscribing to the user and dev mailing list. Its little tough for me to understand which is quite complex for a newbie like me but I am pretty much interested to build my resume
Coming to the pooled connection as suggested by Bear, java maintains a PooledConnection class which effectively utilizes the opened connections for various SQL calls instead of closing and opening new connections which can be expensive for a heavily loaded server. Correct me if I am wrong
Let me explain you the directories I have my tomcat and the mysql-connector.jar.
My webapp is in the eclipse workspace which is
c:\Documents And Settings\Administrator\workspace\UserRegistration.
I am not sure if my context.xml docBase is exactly looking at the UserRegistration folder in the workspace. As I have said my mysql-connector.jar is in the tomcat/lib directory.
For my exercise level proj I am working on MySQL but if I am working realtime I am not sure if the organization uses mysql or other databases that are available. So, my question is where exactly should the .jar file be placed if diff webapps use the same database or I might be wrong in the question.
I am really interested to know the realtime scenario.
Thank you very much for the comments.