diff options
author | wbauer <wbauer@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2008-10-15 13:15:45 +0000 |
---|---|---|
committer | wbauer <wbauer@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2008-10-15 13:15:45 +0000 |
commit | df3f120f1864c23fb4d53622b6667f31cacf8ecc (patch) | |
tree | da910a6c2ca241e53f491d57cf4a7cc6d21a4da3 /BKUOnline | |
parent | f15769e60b062e8dbf5da24df8f0ab0fc9375632 (diff) | |
download | mocca-df3f120f1864c23fb4d53622b6667f31cacf8ecc.tar.gz mocca-df3f120f1864c23fb4d53622b6667f31cacf8ecc.tar.bz2 mocca-df3f120f1864c23fb4d53622b6667f31cacf8ecc.zip |
added a new viewer page for MSIE and XHTML
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@118 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'BKUOnline')
-rw-r--r-- | BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/HashDataInputServlet.java | 14 | ||||
-rw-r--r-- | BKUOnline/src/main/webapp/ieView.html | 31 |
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 |