Fix error when the connections in the pool has been closed.

This commit is contained in:
Paulo Gustavo Veiga
2012-11-02 00:38:13 -03:00
parent 9067a6cff2
commit 806bb96ce1
4 changed files with 461 additions and 1 deletions

View File

@@ -28,6 +28,7 @@ import com.wisemapping.jaxb.freemind.*;
import com.wisemapping.jaxb.wisemap.RelationshipType;
import com.wisemapping.jaxb.wisemap.TopicType;
import com.wisemapping.jaxb.wisemap.Icon;
import org.apache.commons.lang.StringEscapeUtils;
import org.jetbrains.annotations.NotNull;
import org.w3c.dom.Document;
import org.xml.sax.SAXException;
@@ -202,6 +203,7 @@ public class FreemindExporter
final StringBuilder htmlContent = new StringBuilder("<html><head></head><body>");
for (String line : text.split("\n")) {
line = StringEscapeUtils.escapeXml(line);
htmlContent.append("<p>").append(line).append("</p>");
}
htmlContent.append("</body></html>");

View File

@@ -84,7 +84,7 @@ public class TransformView extends AbstractView {
// Write the conversion content ...
final ServletOutputStream outputStream = response.getOutputStream();
if (exportFormat == ExportFormat.FREEMIND) {
response.setCharacterEncoding("iso-8859-1");
response.setCharacterEncoding("ASCII");
factory.export(properties, content, outputStream, null);
} else if (exportFormat == ExportFormat.WISEMAPPING) {
response.setCharacterEncoding("UTF-8");