From 5318e29df51115b0510d6e50cbac106d495d7f44 Mon Sep 17 00:00:00 2001 From: Pablo Luna Date: Wed, 6 Apr 2011 20:36:57 +0100 Subject: [PATCH 1/2] fixing print and export --- .../com/wisemapping/controller/ExportController.java | 10 ++++++---- .../java/com/wisemapping/exporter/ExporterFactory.java | 3 +-- wise-webapp/src/main/webapp/jsp/mindmapList.jsp | 4 ++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/wise-webapp/src/main/java/com/wisemapping/controller/ExportController.java b/wise-webapp/src/main/java/com/wisemapping/controller/ExportController.java index dc51bd8e..bbff318f 100644 --- a/wise-webapp/src/main/java/com/wisemapping/controller/ExportController.java +++ b/wise-webapp/src/main/java/com/wisemapping/controller/ExportController.java @@ -150,6 +150,7 @@ public class ExportController extends BaseMultiActionController { exportImage(response, mapSvg, bos, false); } catch (Throwable e) { logger.error("Unexpexted error generating the image", e); + logger.error("map: "+mapSvg); } BASE64Encoder encoder = new BASE64Encoder(); @@ -164,11 +165,11 @@ public class ExportController extends BaseMultiActionController { } public ModelAndView image(HttpServletRequest request, HttpServletResponse response) throws TranscoderException, IOException, JAXBException { - try { - logger.info("Export Controller: generating image WiseMap action"); + logger.info("Export Controller: generating image WiseMap action"); - final String mapIdStr = request.getParameter(MAP_ID_PARAMETER); - final String mapSvg = request.getParameter(MAP_SVG_PARAMETER); + final String mapIdStr = request.getParameter(MAP_ID_PARAMETER); + final String mapSvg = request.getParameter(MAP_SVG_PARAMETER); + try { final ServletOutputStream outputStream = response.getOutputStream(); exportImage(response, mapSvg, outputStream, true); @@ -176,6 +177,7 @@ public class ExportController extends BaseMultiActionController { } catch (Throwable e) { logger.error("Unexpexted error generating the image", e); + logger.error("map: "+mapSvg); } return null; } diff --git a/wise-webapp/src/main/java/com/wisemapping/exporter/ExporterFactory.java b/wise-webapp/src/main/java/com/wisemapping/exporter/ExporterFactory.java index 9b9af051..e32a9d23 100644 --- a/wise-webapp/src/main/java/com/wisemapping/exporter/ExporterFactory.java +++ b/wise-webapp/src/main/java/com/wisemapping/exporter/ExporterFactory.java @@ -286,8 +286,7 @@ public class ExporterFactory { // Add namespace... result = result.replaceFirst("]+)>", ""); - result = result.replaceAll("]+)//+>", ""); + result = result.replaceAll("/]+)//?>/", ""); return result.toCharArray(); } diff --git a/wise-webapp/src/main/webapp/jsp/mindmapList.jsp b/wise-webapp/src/main/webapp/jsp/mindmapList.jsp index ec4ab39c..f0b9694e 100644 --- a/wise-webapp/src/main/webapp/jsp/mindmapList.jsp +++ b/wise-webapp/src/main/webapp/jsp/mindmapList.jsp @@ -220,9 +220,9 @@ rel="moodalbox 600px 400px" title=""> --%> - + <%-- - + --%> From c9ff2e23d52b7e9fb8d19f4fa3a3301359c25e19 Mon Sep 17 00:00:00 2001 From: Pablo Luna Date: Wed, 6 Apr 2011 20:43:43 +0100 Subject: [PATCH 2/2] adding export test that fails on local --- wise-webapp/src/test/data/svg/map5.svg | 33 ++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 wise-webapp/src/test/data/svg/map5.svg diff --git a/wise-webapp/src/test/data/svg/map5.svg b/wise-webapp/src/test/data/svg/map5.svg new file mode 100644 index 00000000..74b77730 --- /dev/null +++ b/wise-webapp/src/test/data/svg/map5.svg @@ -0,0 +1,33 @@ + + + + + + t + + + + + + Main Topic + + + + + + + \ No newline at end of file