Author: markt
Date: Sun Aug 12 15:42:33 2012
New Revision: 1372132
URL: http://svn.apache.org/viewvc?rev=1372132&view=rev
Log:
Additional fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=53071
Trim long exception messages
Modified:
tomcat/tc7.0.x/trunk/ (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/ErrorReportValve.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
Merged /tomcat/trunk:r1372131
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/ErrorReportValve.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/ErrorReportValve.java?rev=1372132&r1=1372131&r2=1372132&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/ErrorReportValve.java
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/valves/ErrorReportValve.java
Sun Aug 12 15:42:33 2012
@@ -19,6 +19,7 @@ package org.apache.catalina.valves;
import java.io.IOException;
import java.io.Writer;
+import java.util.Scanner;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
@@ -166,7 +167,11 @@ public class ErrorReportValve extends Va
String message = RequestUtil.filter(response.getMessage());
if (message == null) {
if (throwable != null) {
- message = RequestUtil.filter(throwable.getMessage());
+ String exceptionMessage = throwable.getMessage();
+ if (exceptionMessage != null && exceptionMessage.length() > 0)
{
+ message = RequestUtil.filter(
+ (new Scanner(exceptionMessage)).nextLine());
+ }
}
if (message == null) {
message = "";
Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1372132&r1=1372131&r2=1372132&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Sun Aug 12 15:42:33 2012
@@ -63,6 +63,11 @@
when request processing completes. (kkolinko)
</fix>
<fix>
+ <bug>53071</bug>: This additional fix for this issue improves the
+ formatting of Jasper errors (or any exceptions that use a multi-line
+ message) with the <code>ErrorReportValve</code>. (markt)
+ </fix>
+ <fix>
<bug>53469</bug>: If a URL passed to
<code>javax.servlet.http.HttpServletResponse.encodeURL()</code> cannot
be made absolute, never encode it and return it unchanged. Previously,
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]