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/src/main/java | |
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/src/main/java')
-rw-r--r-- | BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/HashDataInputServlet.java | 14 |
1 files changed, 12 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);
|