tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dave Smith" <>
Subject Re: More Tomcat problems.
Date Mon, 02 Oct 2000 20:49:11 GMT
More Tomcat problems.Panagiotis,

Are you using a try block around the code to catch SQLExceptions
in your development setup?

This is what is happening: you are throwing an exception without
a handler. The jvm just unwinds to the top and drops you out. 

Try using something like this in the JSP:

<%@ page errorPage="error-page.jsp" %>

or else debug the connection code in an IDE first.


  ----- Original Message ----- 
  From: Panagiotis Konstantinidis 
  Sent: Thursday, November 30, 2000 12:45 PM
  Subject: More Tomcat problems.

    Hello there again, this is the second message I am sending regarding problems with Tomcat.
In my previous message Kief answered solved my question correctly, so I would really appreciate
if he could answer again this one. It seems that I have exactly the same problem. I am running
a JSP file (lets say myFile.jsp) that open a conenction with the database on the server. The
code is like the following:

    <% ..... 
          String url = <the url string>; 
          String user = <the user string>; 
          String password = <the password string>; 

          Connection con = DriverManager.getConnection(url, user, password); 


  When the line Connection con = DriverManager.getConnection(url, user, password); is encountered
then Tomcat just goes off (and I get the error message from Apache "Internal Server Error.....").
Just like that, with no error messages or anything. This is really weird because I have downloaded
and installed the latest versions of both Apache (v1.3.14) and Tomcat (v3.2) and I have included
the JDBC driver .jar file in my classpath.

    I have looked in the "tomcat.log" file and there are no error messages. I have looked
in the "error.log" file in the Apache directory and I get the error message (for one more
time): [Thu Nov 30 17:47:39 2000] [error] [client] Premature end of script headers:
c:/work/tomcat/jakarta-tomcat-3.2-b7/webapps/panos/myFile.jsp. I cannot think of anything
to do so if somebody knows more about that please help.

     Thank you. 


View raw message