From 907948870ba41526b076e4bb2e9861b805c0f052 Mon Sep 17 00:00:00 2001 From: gregor Date: Wed, 3 Dec 2003 10:03:03 +0000 Subject: Zwischenstand git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@70 d688527b-c9ab-4aba-bd8d-4036d912da1d --- .../at/gv/egovernment/moa/spss/slinterface/beans/DataInfoBean.java | 7 ++++++- .../moa/spss/slinterface/servlets/HashInputDataServlet.java | 4 +++- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'spss.slinterface/WEB-INF/src/at/gv/egovernment') diff --git a/spss.slinterface/WEB-INF/src/at/gv/egovernment/moa/spss/slinterface/beans/DataInfoBean.java b/spss.slinterface/WEB-INF/src/at/gv/egovernment/moa/spss/slinterface/beans/DataInfoBean.java index db67ac411..904640b71 100644 --- a/spss.slinterface/WEB-INF/src/at/gv/egovernment/moa/spss/slinterface/beans/DataInfoBean.java +++ b/spss.slinterface/WEB-INF/src/at/gv/egovernment/moa/spss/slinterface/beans/DataInfoBean.java @@ -419,9 +419,10 @@ public class DataInfoBean implements HttpSessionBindingListener } Element contentElem = (Element) contentNL.item(0); - // Get signature environment document form siganture environment content + // Get signature environment document from signature environment content String contentElemLocName = contentElem.getLocalName(); Element sigEnvElem = null; + Element oldDocElem = null; if (XMLCONT_ELEM_.equals(contentElemLocName)) { // XML content @@ -432,6 +433,7 @@ public class DataInfoBean implements HttpSessionBindingListener if (currContNode.getNodeType() == Node.ELEMENT_NODE) { sigEnvElem = (Element) currContNode; + oldDocElem = (Element) moaRequestDoc.replaceChild(sigEnvElem, moaRequestDoc.getDocumentElement()); break; } } @@ -498,6 +500,9 @@ public class DataInfoBean implements HttpSessionBindingListener logger_.error(message); throw new Exception(message); } + + if (oldDocElem != null) moaRequestDoc.replaceChild(oldDocElem, moaRequestDoc.getDocumentElement()); + return (Element) sigElemNL.item(0); } } diff --git a/spss.slinterface/WEB-INF/src/at/gv/egovernment/moa/spss/slinterface/servlets/HashInputDataServlet.java b/spss.slinterface/WEB-INF/src/at/gv/egovernment/moa/spss/slinterface/servlets/HashInputDataServlet.java index 193a15a9e..3a78b07f4 100644 --- a/spss.slinterface/WEB-INF/src/at/gv/egovernment/moa/spss/slinterface/servlets/HashInputDataServlet.java +++ b/spss.slinterface/WEB-INF/src/at/gv/egovernment/moa/spss/slinterface/servlets/HashInputDataServlet.java @@ -72,7 +72,9 @@ public class HashInputDataServlet extends HttpServlet String hidFilename = dataInfo.getHashInputDataFilename(); // Set response headers - response.setContentType("application/octet-stream"); + boolean isSLXHTML = dataInfo.getIsSLXHTMLDocument(); + String contenType = (isSLXHTML) ? "text/html" : "application/octet-stream"; + response.setContentType(contenType); // Write content from temporary HID file to response OS try -- cgit v1.2.3