Three suggestions:
1. Instead of starting Tomcat with startup.bat, invoke tomcat.bat with a "run" parameter:
This will cause Tomcat to be run from the current window rather than opening a new one (which dies when Tomcat dies). That way, you'll be able to see any error messages or stack traces that otherwise would have flashed by.
2. Divide and conquer: copy your JSP code to a standalone
Java class, removing all the web-related syntax. Just run it from within
That way, you don't have to contend with whatever might be going wrong on the web side - just concentrate on the database code.
It's quite likely that the problem relates to the JDBC-ODBC bridge and the ODBC data source. That brings me to the third suggestion:
3. Turn on
JDBC logging:
Add this statement just before you create the connection:
This will pump out more than you ever wanted to know about what's happening with the database.
My guess is that one or more of your columns.getString() statements is referring to a field that doesn't exist in the table. Check the spelling and case sensitivity. Also try retrieving by column number (in order) rather than column name. Some ODBC drivers are picky about that.
You should also take care to properly close your connection no matter what, so that the underlying ODBC driver and database are in a known state. If you don't shut down cleanly, you may not be able to connect properly for the next request. A typical
pattern for this is the following:
------------------
Phil Hanna
Sun Certified Programmer for the Java 2 Platform
Author of :
JSP: The Complete Reference Instant Java Servlets Website:
http://www.philhanna.com