tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Osipov, Michael" <michael.osi...@siemens.com>
Subject RE: StandardHostValve kills custom error message
Date Fri, 13 Apr 2012 09:36:28 GMT
Konstantin Kolinko wrote:
 
>> The message is not diplayed because in line 282 to 286 the message
>> is killed by: 
>> else {
>>            // A custom error-page has not been defined for the
>> exception 
>>            // that was thrown during request processing. Check if an
>>            // error-page for error code 500 was specified and if so,
>>            // send that page back as the response.
>>          
>> response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); 
>>            // The response is an error
>>            response.setError();
>> 
>>            status(request, response);
>>        }
>> 
>> It seems like this valve does not care if it handles an uncaught
>> exception or a deliberate exception. 
>> Can this be fixed without patching the valve?
>> 
>> I guess not. I would file a ticket about that: A mere
>> response#isError call would suffice to wrap that behavior and pass
>> the response as is.  
>> 
> 
> 
> My understanding is that it is responsibility of the Container to
> provide the value for the request attribute
> "javax.servlet.error.exception"

There is simple fix. A examined other server-side component how they set that attribute and
adapted my code.
All you need to do is described in my new ticket: https://issues.apache.org/bugzilla/show_bug.cgi?id=53071

With best regards,
Michael Osipov

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


Mime
View raw message