summaryrefslogtreecommitdiff
path: root/BKUOnline/src
diff options
context:
space:
mode:
Diffstat (limited to 'BKUOnline/src')
-rw-r--r--BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/HashDataInputServlet.java14
-rw-r--r--BKUOnline/src/main/webapp/ieView.html31
2 files changed, 43 insertions, 2 deletions
diff --git a/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/HashDataInputServlet.java b/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/HashDataInputServlet.java
index 210dce5a..b2d6c21f 100644
--- a/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/HashDataInputServlet.java
+++ b/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/HashDataInputServlet.java
@@ -74,6 +74,7 @@ public class HashDataInputServlet extends SpringBKUServlet {
resp.sendRedirect("multiHashDataInput.html");
return;
}
+
if ((param == null) && (hdi.size() == 1)) {
param = hdi.get(0).getReferenceId();
log.debug("Request parameter not set, setting to: " + param);
@@ -82,6 +83,7 @@ public class HashDataInputServlet extends SpringBKUServlet {
if (hd.getReferenceId().equals(param)) {
log.debug("Found hashdatainput for refId:" + param);
resp.setContentType(hd.getMimeType());
+
String charSet = hd.getEncoding();
if (charSet == null) {
charSet = "UTF-8";
@@ -91,8 +93,16 @@ public class HashDataInputServlet extends SpringBKUServlet {
String fileExt = hd.getMimeType().equalsIgnoreCase("text/plain") ? ".txt"
: ".xhtml";
if (fileExt.equals(".xhtml")) {
- resp.addHeader("content-disposition", "attachment; filename="
- + param + fileExt);
+ if (req.getParameter("ieCType") == null) {
+ resp.sendRedirect("ieView.html");
+ return;
+ } else {
+ resp.setContentType(req.getParameter("ieCType"));
+ if (req.getParameter("ieCType").equals("application/xhtml+xml")) {
+ resp.addHeader("content-disposition", "attachment; filename="
+ + param + ".xhtml");
+ }
+ }
}
}
Reader r = new InputStreamReader(hd.getHashDataInput(), charSet);
diff --git a/BKUOnline/src/main/webapp/ieView.html b/BKUOnline/src/main/webapp/ieView.html
new file mode 100644
index 00000000..0892b5b4
--- /dev/null
+++ b/BKUOnline/src/main/webapp/ieView.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Anzeige</title>
+<style type="text/css">
+body {
+ font-size: 15px;
+ font-weight: 500;
+ font-family: Helvetica, Arial, sans-serif;
+ background-color: #EEEEEE;
+}
+
+h1 {
+ font-size: 20px;
+}
+</style>
+</head>
+<body>
+<h1>ACHTUNG: Ihr Browser unterstützt kein XHTML. Die unten
+dargestellten Daten können von den Signaturdaten abweichen.</h1>
+<a href="hashDataInput?ieCType=application%2Fxhtml%2Bxml">Hier</a>
+können Sie die Originaldaten herunterladen.
+<br>
+<p>
+<div style="height:700px;">
+<iframe src="hashDataInput?ieCType=text/html" width="100%" height="100%" marginwidth="0"
+marginheight="0" frameborder="0">Ihr Browser unterstütz leider keine Iframes</iframe>
+</div>
+</body>
+</html> \ No newline at end of file