Author: mrdon
Date: Tue Oct  3 20:15:14 2006
New Revision: 452707

URL: http://svn.apache.org/viewvc?view=rev&rev=452707
Log:
Minor cleanups for problem report and debugging handler
WW-1453

Modified:
    
struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/debugging/DebuggingInterceptor.java
    
struts/struts2/trunk/core/src/main/resources/org/apache/struts2/dispatcher/error.ftl

Modified: 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/debugging/DebuggingInterceptor.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/debugging/DebuggingInterceptor.java?view=diff&rev=452707&r1=452706&r2=452707
==============================================================================
--- 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/debugging/DebuggingInterceptor.java
 (original)
+++ 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/debugging/DebuggingInterceptor.java
 Tue Oct  3 20:15:14 2006
@@ -128,15 +128,16 @@
                 inv.addPreResultListener(
                         new PreResultListener() {
                             public void beforeResult(ActionInvocation inv, 
String actionResult) {
+                                String xml = "";
                                 if (enableXmlWithConsole) {
                                     StringWriter writer = new StringWriter();
                                     printContext(new 
PrettyPrintWriter(writer));
-                                    String xml = writer.toString();
+                                    xml = writer.toString();
                                     xml = xml.replaceAll("&", "&");
                                     xml = xml.replaceAll(">", ">");
                                     xml = xml.replaceAll("<", "&lt;");
-                                    ActionContext.getContext().put("debugXML", 
xml);
                                 }
+                                ActionContext.getContext().put("debugXML", 
xml);
 
                                 FreemarkerResult result = new 
FreemarkerResult();
                                 result.setContentType("text/html");

Modified: 
struts/struts2/trunk/core/src/main/resources/org/apache/struts2/dispatcher/error.ftl
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/org/apache/struts2/dispatcher/error.ftl?view=diff&rev=452707&r1=452706&r2=452707
==============================================================================
--- 
struts/struts2/trunk/core/src/main/resources/org/apache/struts2/dispatcher/error.ftl
 (original)
+++ 
struts/struts2/trunk/core/src/main/resources/org/apache/struts2/dispatcher/error.ftl
 Tue Oct  3 20:15:14 2006
@@ -1,6 +1,12 @@
 <html>
 <head>
     <title>Struts Problem Report</title>
+    <style>
+       pre {
+               margin: 0;
+               padding: 0;
+           }    
+    </style>
 </head>
 <body>
     <h2>Struts Problem Report</h2>


Reply via email to