When I use the first one, the exception implicit object on my errorPage.jsp is a ServletException object with "messageString" as its message--exactly as it should be.
When I use the last one, exception of the causeExceptionObject, as it should be.
However, when I use the middle one--message string AND cause object--then the exception implicit object is just the causeExceptionObject rather than a ServletException object with "messageString" for the message and causeExceptionObject as the cause.
Anyone have any idea why? (I'm using j2sdk1.4.2 for JAVA_HOME).
As mentioned in the definition of this Class:
public ServletException(String message,Throwable rootCause)
Constructs a new servlet exception when the servlet needs to throw an exception and include a message about the "root cause" exception that interfered with its normal operation, including a description message.
I'm guessing the included message is only the root cause of the exception and not message of the ServletException. You may want to paste your code so we can have a closer look.
Hope that helps.
[ February 12, 2004: Message edited by: Owee Nicolas ]
As long as I stick to Exceptions and SQLExceptions, it works just fine. SO, I think my code is correct. It's only when the top-level exception is ServletException("message", causeExObject) that it fails.