Removed the "close" call of the writer of the response.

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/branches/STRUTS_2_0_X@668256 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Antonio Petrelli
2008-06-16 18:27:18 +00:00
parent 1470efd592
commit ee2d3371e1
@@ -22,7 +22,6 @@ package org.apache.struts2.views.xslt;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.Writer;
import java.net.URL;
import java.util.HashMap;
import java.util.Map;
@@ -315,8 +314,6 @@ public class XSLTResult implements Result {
try {
HttpServletResponse response = ServletActionContext.getResponse();
Writer writer = response.getWriter();
// Create a transformer for the stylesheet.
Templates templates = null;
Transformer transformer;
@@ -354,13 +351,11 @@ public class XSLTResult implements Result {
LOG.debug("xmlSource = " + xmlSource);
transformer.transform(xmlSource, new StreamResult(out));
out.close(); // ...and flush...
out.flush(); // ...and flush...
if (LOG.isDebugEnabled()) {
LOG.debug("Time:" + (System.currentTimeMillis() - startTime) + "ms");
}
writer.flush();
} catch (Exception e) {
LOG.error("Unable to render XSLT Template, '" + location + "'", e);
throw e;