aboutsummaryrefslogtreecommitdiff
path: root/spss.slinterface/WEB-INF
diff options
context:
space:
mode:
Diffstat (limited to 'spss.slinterface/WEB-INF')
-rw-r--r--spss.slinterface/WEB-INF/src/at/gv/egovernment/moa/spss/slinterface/beans/DataInfoBean.java7
-rw-r--r--spss.slinterface/WEB-INF/src/at/gv/egovernment/moa/spss/slinterface/servlets/HashInputDataServlet.java4
2 files changed, 9 insertions, 2 deletions
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