Using Tomcat 3.2: when an exception is raised in the constructor of a bean 
(<jsp:usebean>) the Exception is transformed by the JSP/Serlvet engine into a 
ServletException.

What is lacking is that the RootCause is not set (constructor public 
ServletException(java.lang.Throwable rootCause) should be used).

Part of the generated servlet:

try {
  connections = (common.DbConnection) 
Beans.instantiate(this.getClass().getClassLoader(), "common.DbConnection");
} catch (Exception exc) {
  throw new ServletException (" Cannot create bean of class "+"common.DbConnection");
}


The ServletException constructor should include exc as second argument.

This applies to many more places, and also when printing the ServletException 
stacktrace (in the servlet engine), the getRootCasue() should be used to print 
information on the original Exception as well.

Has this been fixed in later releases?


Peter Mutsaers


Reply via email to