hi,everyone here. I developed a Servlet program connecting to the Ms-access database via the JDBC-ODBC bridge bundled with Sun's JDK. It works fine in the NetBean4.1. Following is the Servlet code which gives you a general idea.
Basicaaly, this program connects to the database via JDBC-ODBC bridge and retrieves the data back to the client, works fine in the Netbean. And in the Netbean I do not bother with setting up the CATALINA_HOME, JAVA_HOME etc, just build and run the program, at this stage, everthing seems nice and cool.
Now, when I put this similar program into another computer which has the latest tomcat5.5.x only, the Servlet program doesn't work. Well, the client can access the Servlet program but stuck in the following code and can not get through the database connection.
I thought it was a Tomcat setup problem but having seen the following link in the Tomcat FAQ: Database, my heart was broken.
What does "the Servlet program doesn't work" mean? Do you get an exception? If so, post the output of the printStackTrace call so we can have a look at it. If there's no exception, what does the getConnection method return? Can the servlet reach the DB over the network (and is it allowed to do so)?
Speaking more generally, yes, you should not use the JDBC/ODBC bridge in a servlet environment. But if it works on your IDE, it should work in Tomcat, if you're careful not to generate simultaneous accesses.
The only problem which seems to me is that your "another computer" is not able to get through to the database. Try accessing the database with other means [toad etc.] and verify that you can access the database.