I recently started working on my first web service that has a class for server, one client and several helpful. Tomcat version is 5.5.
Communication between server and client is with SOAP so I used Apache Axis 1.4 and was able to configure it correctly.
And I have some tables in a database which i want to access from the server, but fail to do so under any circumstances.
I modified by adding context.xml file
between <Context ...> and </Context>
Also, I put in web.xml
Connecting to a database is this: (in server.java)
The project was done in NetBeans IDE with Tomcat. The JDBC library folder is in common\lib of tomcat so everything is ok from this point of view.
I noticed something very suspicious: if i put connection code in index.jsp file under web-pages, then it connects successfully. I think it's a problem of context, but I'm not sure, seeing in other tutorials as connecting occurs in other classes (not from index.jsp).