tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Costin Manolache <cmanola...@yahoo.com>
Subject Re: [PATCH] Root cause lost in Jsp and ServletException
Date Wed, 05 Feb 2003 15:18:03 GMT
Ops...

Sorry - you're right. 

There is a way to make it compatible with both 1.3- and 1.4 - but it would
require changing the interface, so probably need to send feedback to the
jcp...

( adding a Throwable getCause() to the interface would make the stack traces
work again ).



Costin

Glenn Nielsen wrote:

> BTW, this does not build with JDK's < 1.4 and if you use a servlet.jar
> built with 1.4 in a JVM <1.4 you get a NoSuchMethodError.
> 
> This change for jakarta-servletapi-4 need to reverted for now.
> 
> Glenn
> 
> 
> Costin Manolache wrote:
>> this is for servetapi_4.
>> 
>> Same applies to servletapi_5 ( I already sent a patch few weeks ago ).
>> 
>> The problem is that JDK1.4 stack traces can't find the root cause.
>> 
>> AFAIK nothing in the servlet or JSP specs requires breaking the normal
>> contract for exceptions - which is to pass the root cause to the parent.
>> 
>> Costin
>> 
>> Index: src/share/javax/servlet/ServletException.java
>> ===================================================================
>> RCS file:
>>
/home/cvs/jakarta-servletapi-4/src/share/javax/servlet/ServletException.java,v
>> retrieving revision 1.1.1.1
>> diff -u -r1.1.1.1 ServletException.java
>> --- src/share/javax/servlet/ServletException.java       9 Jan 2001
>> 03:24:16 -0000 1.1.1.1
>> +++ src/share/javax/servlet/ServletException.java       4 Feb 2003
>> 19:00:30 -0000 @@ -129,7 +129,7 @@
>>       */
>>      
>>      public ServletException(String message, Throwable rootCause) {
>> -       super(message);
>> +       super(message, rootCause);
>>         this.rootCause = rootCause;
>>      }
>>  
>> @@ -158,7 +158,7 @@
>>       */
>>  
>>      public ServletException(Throwable rootCause) {
>> -       super(rootCause.getLocalizedMessage());
>> +       super(rootCause.getLocalizedMessage(), rootCause);
>>         this.rootCause = rootCause;
>>      }
>>    
>> Index: src/share/javax/servlet/jsp/JspException.java
>> ===================================================================
>> RCS file:
>>
/home/cvs/jakarta-servletapi-4/src/share/javax/servlet/jsp/JspException.java,v
>> retrieving revision 1.1.1.1
>> diff -u -r1.1.1.1 JspException.java
>> --- src/share/javax/servlet/jsp/JspException.java       9 Jan 2001
>> 03:24:20 -0000 1.1.1.1
>> +++ src/share/javax/servlet/jsp/JspException.java       4 Feb 2003
>> 19:00:31 -0000 @@ -106,7 +106,7 @@
>>       */
>>      
>>      public JspException(String message, Throwable rootCause) {
>> -       super(message);
>> +       super(message, rootCause);
>>         this.rootCause = rootCause;
>>      }
>>  
>> @@ -132,7 +132,7 @@
>>       */
>>  
>>      public JspException(Throwable rootCause) {
>> -       super(rootCause.getLocalizedMessage());
>> +       super(rootCause.getLocalizedMessage(), rootCause);
>>         this.rootCause = rootCause;
>>      }
>>  
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message