diff options
author | mcentner <mcentner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2010-07-14 15:22:56 +0000 |
---|---|---|
committer | mcentner <mcentner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2010-07-14 15:22:56 +0000 |
commit | 5e10b6b575993c78ac22191849c464b618c4fa8a (patch) | |
tree | 55911c2b6d69e787dd408d63c1e641d6db39c5dc /BKUOnline/src/main/webapp | |
parent | dc95c76a126b4f3135645d3e20b152134d201244 (diff) | |
download | mocca-5e10b6b575993c78ac22191849c464b618c4fa8a.tar.gz mocca-5e10b6b575993c78ac22191849c464b618c4fa8a.tar.bz2 mocca-5e10b6b575993c78ac22191849c464b618c4fa8a.zip |
MOCCA Online HTTP binding refactored.
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@762 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'BKUOnline/src/main/webapp')
-rw-r--r-- | BKUOnline/src/main/webapp/WEB-INF/web.xml | 263 | ||||
-rw-r--r-- | BKUOnline/src/main/webapp/applet.jsp | 391 | ||||
-rw-r--r-- | BKUOnline/src/main/webapp/css/applet.css | 15 | ||||
-rw-r--r-- | BKUOnline/src/main/webapp/css/appletAlternative.css | 12 | ||||
-rw-r--r-- | BKUOnline/src/main/webapp/expired.jsp (renamed from BKUOnline/src/main/webapp/expired.html) | 24 | ||||
-rw-r--r-- | BKUOnline/src/main/webapp/img/dec.png | bin | 6311 -> 309 bytes | |||
-rw-r--r-- | BKUOnline/src/main/webapp/img/help.png | bin | 303 -> 185 bytes | |||
-rw-r--r-- | BKUOnline/src/main/webapp/img/inc.png | bin | 7198 -> 344 bytes | |||
-rw-r--r-- | BKUOnline/src/main/webapp/js/deployJava_orig.js | 725 | ||||
-rw-r--r-- | BKUOnline/src/main/webapp/local.jsp | 104 |
10 files changed, 397 insertions, 1137 deletions
diff --git a/BKUOnline/src/main/webapp/WEB-INF/web.xml b/BKUOnline/src/main/webapp/WEB-INF/web.xml index 13ed30ee..3a318844 100644 --- a/BKUOnline/src/main/webapp/WEB-INF/web.xml +++ b/BKUOnline/src/main/webapp/WEB-INF/web.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- + <!-- Copyright 2008 Federal Chancellery Austria and Graz University of Technology Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the @@ -12,138 +12,159 @@ the specific language governing permissions and limitations under the License. --> -<web-app id="bkuonline" version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> - <display-name>http-security-layer-request</display-name> - - <listener> - <listener-class>at.gv.egiz.bku.online.webapp.MoccaContextListener</listener-class> - </listener> - - <!-- Begin Spring Config --> +<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" + id="bkuonline" version="2.5"> + <display-name>MOCCA Online</display-name> + <listener> + <listener-class>at.gv.egiz.bku.online.webapp.MoccaContextListener</listener-class> + </listener> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <context-param> + <!-- + You may specify your configuration resource below. Please do not + remove the the configurationResource parameter if not used, but set + it to an empty value. + --> <param-name>configurationResource</param-name> <param-value></param-value> </context-param> - <!-- End Spring Config --> - - <!-- Begin BKU Config --> - <listener> - <listener-class>at.gv.egiz.bku.online.webapp.SessionListener</listener-class> - </listener> - <listener> - <listener-class>com.sun.xml.ws.transport.http.servlet.WSServletContextListener</listener-class> - </listener> - <servlet> - <servlet-name>BKUServlet</servlet-name> - <servlet-class>at.gv.egiz.bku.online.webapp.BKURequestHandler</servlet-class> - </servlet> - <servlet> - <servlet-name>SAMLServlet</servlet-name> - <servlet-class>at.gv.egiz.mocca.id.SAMLRequestHandler</servlet-class> - </servlet> - <servlet> - <servlet-name>DataURLServlet</servlet-name> - <servlet-class>at.gv.egiz.mocca.id.DataURLServerServlet</servlet-class> - </servlet> - <servlet> - <servlet-name>ResultServlet</servlet-name> - <servlet-class>at.gv.egiz.bku.online.webapp.ResultServlet</servlet-class> - <init-param> - <param-name>responseEncoding</param-name> - <param-value>UTF-8</param-value> - </init-param> - <init-param> - <param-name>expiredPage</param-name> - <param-value>expired.html</param-value> - </init-param> - </servlet> + <listener> + <listener-class>at.gv.egiz.bku.online.webapp.SessionListener</listener-class> + </listener> + <listener> + <listener-class>com.sun.xml.ws.transport.http.servlet.WSServletContextListener</listener-class> + </listener> + <servlet> + <!-- + This servlet accepts HTTP(S) Security Layer requests and redirects to + UIServlet. + --> + <servlet-name>HTTPSecurityLayerServlet</servlet-name> + <servlet-class>at.gv.egiz.bku.online.webapp.WebRequestHandler</servlet-class> + <init-param> + <param-name>protocol</param-name> + <param-value>HTTP</param-value> + </init-param> + </servlet> + <servlet> + <!-- + This Servlet handles user interaction. In fact it merely sets some + request attributes and hands over (forwards) to the requested uiPage + (e.g. applet.jsp). + --> + <servlet-name>UIServlet</servlet-name> + <servlet-class>at.gv.egiz.bku.online.webapp.UIServlet</servlet-class> + <init-param> + <!-- + The uiPage parameter below specifies the default uiPage, which is + used if no specific page was requested. + --> + <param-name>uiPage</param-name> + <param-value>applet.jsp</param-value> + </init-param> + <init-param> + <!-- + If no protocol specific request (e.g. http security layer request) + is associated with the request to this servlet, a temporary redirect + to the URL given below is sent to the browser. + --> + <param-name>expiredPageUrl</param-name> + <param-value>expired.jsp</param-value> + </init-param> + </servlet> + <servlet> + <servlet-name>ResultServlet</servlet-name> + <servlet-class>at.gv.egiz.bku.online.webapp.ResultServlet</servlet-class> + <init-param> + <param-name>responseEncoding</param-name> + <param-value>UTF-8</param-value> + </init-param> + <init-param> + <!-- + If no protocol specific request (e.g. http security layer request) + is associated with the request to this servlet, a temporary redirect + to the URL given below is sent to the browser. + --> + <param-name>expiredPageUrl</param-name> + <param-value>expired.jsp</param-value> + </init-param> + </servlet> <servlet> + <!-- + STAL Web Service + --> <servlet-name>STALService</servlet-name> <servlet-class>com.sun.xml.ws.transport.http.servlet.WSServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> + <!-- <servlet>--> + <!-- <servlet-name>SAMLServlet</servlet-name>--> + <!-- <servlet-class>at.gv.egiz.bku.online.webapp.WebRequestHandler</servlet-class> --> + <!-- <init-param>--> + <!-- <param-name>protocol</param-name>--> + <!-- <param-value>SAML</param-value>--> + <!-- </init-param>--> + <!-- </servlet>--> + <!-- <servlet>--> + <!-- <servlet-name>DataURLServlet</servlet-name>--> + <!-- <servlet-class>at.gv.egiz.mocca.id.DataURLServerServlet</servlet-class> --> + <!-- </servlet>--> <servlet-mapping> - <servlet-name>BKUServlet</servlet-name> + <servlet-name>HTTPSecurityLayerServlet</servlet-name> <url-pattern>/http-security-layer-request</url-pattern> </servlet-mapping> - <servlet-mapping> - <servlet-name>BKUServlet</servlet-name> - <url-pattern>/https-security-layer-request</url-pattern> - </servlet-mapping> - <servlet-mapping> - <servlet-name>DataURLServlet</servlet-name> - <url-pattern>/DataURLServer</url-pattern> - </servlet-mapping> - <servlet-mapping> - <servlet-name>ResultServlet</servlet-name> - <url-pattern>/bkuResult</url-pattern> - </servlet-mapping> - <servlet-mapping> - <servlet-name>SAMLServlet</servlet-name> - <url-pattern>/moccaid</url-pattern> - </servlet-mapping> - <servlet-mapping> - <servlet-name>DataURLServlet</servlet-name> - <url-pattern>/DataURLServer</url-pattern> - </servlet-mapping> - - - <!-- - | Configure alternative applet pages that may be requested - | via the 'appletPage' form parameter (cf. SLRequestForm.html) - <servlet> - <servlet-name>BKUAppletAlternative</servlet-name> - <jsp-file>/appletAlternative.jsp</jsp-file> - </servlet--> - - <!-- - | To disable applet caching load the applet via the AppletDispatcher - | (cf. applet.jsp) - <servlet> - <servlet-name>AppletDispatcher</servlet-name> - <servlet-class>at.gv.egiz.bku.online.webapp.AppletDispatcher</servlet-class> - </servlet> - <servlet-mapping> - <servlet-name>AppletDispatcher</servlet-name> - <url-pattern>/applet/dispatch/*</url-pattern> - </servlet-mapping--> - - <!-- End BKU Config --> - - <!-- Begin BKU Web Start Config - | (activate 'include-webstart' profile) - <servlet> - <servlet-name>JnlpDownloadServlet</servlet-name> - <servlet-class>jnlp.sample.servlet.JnlpDownloadServlet</servlet-class> - <init-param> - <param-name>logLevel</param-name> - <param-value>DEBUG</param-value> - </init-param> - <init-param> - <param-name>logPath</param-name> - <param-value>logs/jnlpdownloadservlet.log</param-value> - </init-param> - </servlet> - - <servlet-mapping> - <servlet-name>JnlpDownloadServlet</servlet-name> - <url-pattern>/webstart/*</url-pattern> - </servlet-mapping> - --> - <!-- End BKU Web Start Config --> - - <servlet-mapping> - <servlet-name>STALService</servlet-name> - <url-pattern>/stal</url-pattern> - </servlet-mapping> - <session-config> - <session-timeout>5</session-timeout> - </session-config> - <welcome-file-list> - <welcome-file>index.html</welcome-file> - <welcome-file>index.jsp</welcome-file> - </welcome-file-list> -</web-app> + <servlet-mapping> + <servlet-name>HTTPSecurityLayerServlet</servlet-name> + <url-pattern>/https-security-layer-request</url-pattern> + </servlet-mapping> + <servlet-mapping> + <servlet-name>UIServlet</servlet-name> + <url-pattern>/ui</url-pattern> + </servlet-mapping> + <servlet-mapping> + <servlet-name>ResultServlet</servlet-name> + <url-pattern>/result</url-pattern> + </servlet-mapping> + <servlet-mapping> + <servlet-name>STALService</servlet-name> + <url-pattern>/stal</url-pattern> + </servlet-mapping> + <!-- <servlet-mapping>--> + <!-- <servlet-name>SAMLServlet</servlet-name>--> + <!-- <url-pattern>/moccaid</url-pattern>--> + <!-- </servlet-mapping>--> + <!-- <servlet-mapping>--> + <!-- <servlet-name>DataURLServlet</servlet-name>--> + <!-- <url-pattern>/DataURLServer</url-pattern>--> + <!-- </servlet-mapping>--> + <session-config> + <session-timeout>5</session-timeout> + </session-config> + <welcome-file-list> + <welcome-file>index.html</welcome-file> + <welcome-file>index.jsp</welcome-file> + </welcome-file-list> + <!-- + Servlet Filter for Request/Session tracking. + --> + <filter> + <filter-name>RequestIdFilter</filter-name> + <filter-class>at.gv.egiz.bku.online.webapp.RequestIdFilter</filter-class> + </filter> + <filter-mapping> + <filter-name>RequestIdFilter</filter-name> + <servlet-name>HTTPSecurityLayerServlet</servlet-name> + </filter-mapping> + <filter-mapping> + <filter-name>RequestIdFilter</filter-name> + <servlet-name>UIServlet</servlet-name> + </filter-mapping> + <filter-mapping> + <filter-name>RequestIdFilter</filter-name> + <servlet-name>ResultServlet</servlet-name> + </filter-mapping> +</web-app>
\ No newline at end of file diff --git a/BKUOnline/src/main/webapp/applet.jsp b/BKUOnline/src/main/webapp/applet.jsp index eba0ed87..ee1cca2a 100644 --- a/BKUOnline/src/main/webapp/applet.jsp +++ b/BKUOnline/src/main/webapp/applet.jsp @@ -14,226 +14,199 @@ See the License for the specific language governing permissions and limitations under the License. --> -<%@ page language="java" contentType="text/html; charset=UTF-8" - pageEncoding="UTF-8" - import="at.gv.egiz.bku.online.webapp.AppletDispatcher, org.apache.commons.lang.RandomStringUtils, org.apache.commons.lang.StringEscapeUtils" %> - -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> +<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%-- + + This JSP page loads the MOCCA applet into the browser. It is not intended + to by directly called by the browser, but the UIServlet should be called. + The UIServlet sets some request attributes and forwards to this page. + + The look and behavior of this page and the embedded applet may be + customized by a number of parameters handed over in the request. If this + does not provide enough flexibility you may choose to modify this page + or provide an alternative customized page. The name of the customized page + may be specified as parameter in the original request. The UIServlet will + forward to the given page. + + --%> +<%-- Applet --%> +<c:set var="defaultWidth" value="190"/> +<c:set var="defaultHeight" value="130"/> +<c:set var="minJavaVersion" value="1.6.0_04"/> +<%-- Images --%> +<c:set var="defaultButtonWidth" value="16"/> +<c:set var="defaultButtonHeight" value="22"/> +<%-- URLs --%> +<c:url value="/applet" var="codebaseUrl"/> +<c:url value="/help/" var="helpUrl"/> +<c:url value="/stal;jsessionid=${requestScope.id}?wsdl" var="wsdlUrl"/> +<c:url value="/result;jsessionid=${requestScope.id}" var="resultUrl"/> +<%-- Messages --%> +<fmt:bundle basename="web"> +<%-- Applet archive and class --%> +<%-- + Uncomment the following line if you would like to prevent applet caching! +--%> +<%-- jsp:useBean id="now" class="java.util.Date" scope="request"/ --%> +<c:choose> + <c:when test="${requestScope.moccaParam.extension == 'activation'}"> + <c:url var="appletArchive" value="BKUAppletExt-single.jar"> + <c:if test="${! empty now}"> + <c:param name="no-cache" value="${now.time}"/> + </c:if> + </c:url> + <c:set var="appletClass" value="at.gv.egiz.bku.online.applet.ActivationApplet.class"/> + </c:when> + <c:when test="${requestScope.moccaParam.extension == 'pin'}"> + <c:url var="appletArchive" value="BKUAppletExt-single.jar"> + <c:if test="${! empty now}"> + <c:param name="no-cache" value="${now.time}"/> + </c:if> + </c:url> + <c:set var="appletClass" value="at.gv.egiz.bku.online.applet.PINManagementApplet.class"/> + </c:when> + <c:otherwise> + <c:url var="appletArchive" value="BKUApplet-single.jar"> + <c:if test="${! empty now}"> + <c:param name="no-cache" value="${now.time}"/> + </c:if> + </c:url> + <c:set var="appletClass" value="at.gv.egiz.bku.online.applet.BKUApplet.class"/> + </c:otherwise> +</c:choose> +<!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>MOCCA Applet</title> - <link rel="shortcut icon" href="img/chip16.ico" type="image/x-icon"> - <script type="text/javascript" src="js/deployJava.js"></script> - <style type="text/css" media="all">@import "css/applet.css";</style> - - <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE"> - <META HTTP-EQUIV="EXPIRES" CONTENT="Mon, 22 Jul 2002 11:12:01 GMT"> - <META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE"> - </head> - <% - String locale = StringEscapeUtils.escapeJavaScript( - (String) session.getAttribute("locale")); - - int width = session.getAttribute("appletWidth") == null ? 190 - : (Integer) session.getAttribute("appletWidth"); - int height = session.getAttribute("appletHeight") == null ? 130 - : (Integer) session.getAttribute("appletHeight"); - String backgroundImg = StringEscapeUtils.escapeJavaScript( - session.getAttribute("appletBackground") == null - ? "../img/chip32.png" - : (String) session.getAttribute("appletBackground")); - String backgroundColor = StringEscapeUtils.escapeJavaScript( - (String) session.getAttribute("appletBackgroundColor")); - String guiStyle = StringEscapeUtils.escapeJavaScript( - (String) session.getAttribute("appletGuiStyle")); - - String sessionId = StringEscapeUtils.escapeJavaScript(session.getId()); - - String extension = (String) session.getAttribute("appletExtension"); - String appletClass, appletArchive; - if ("activation".equalsIgnoreCase(extension)) { - appletArchive = "BKUAppletExt-single"; - appletClass = "at.gv.egiz.bku.online.applet.ActivationApplet.class"; - } else if ("pin".equalsIgnoreCase(extension)) { - appletArchive = "BKUAppletExt-single"; - appletClass = "at.gv.egiz.bku.online.applet.PINManagementApplet.class"; - } else { - appletArchive = "BKUApplet-single"; - appletClass = "at.gv.egiz.bku.online.applet.BKUApplet.class"; + <head> + <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"> + <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE"> + <META HTTP-EQUIV="EXPIRES" CONTENT="Mon, 22 Jul 2002 11:12:01 GMT"> + <META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE"> + <title><fmt:message key="title"/></title> + <link rel="shortcut icon" href="img/chip16.ico" type="image/x-icon"> + <style type="text/css" media="all"> + root { + display: block; + } + body { + background: #ffffff; + padding: 0; + margin: 0; + border-style: none; + width: <c:out value="${requestScope.moccaParam.appletWidth}" default="${defaultWidth}"/>px; + } + #container { + padding: 0; + margin: 0; + width: <c:out value="${requestScope.moccaParam.appletWidth}" default="${defaultWidth}"/>px; + background: <c:out value="${requestScope.moccaParam.appletBackgroundColor}" default="#eeeeee"/>; + } + #container applet{ + padding: 0; + margin: 0; + } + .button { + width: <c:out value="${defaultButtonWidth}px"/>; + height: <c:out value="${defaultButtonHeight}px"/>; + text-decoration: none; + border-style: none; + } + #message { + margin: 0; + padding: 0.25em 0 0.25em 0; + clear: both; + } + #message p{ + margin: 0; + padding: 0.25em 0.5em 0.25em 0.5em; + } + </style> + <script type="text/javascript" src="http://www.java.com/js/deployJava.js"></script> + <script type="text/javascript"> + var iframe = (top.location.href != window.location.href); + var fontSize = 100; + var width = <c:out value="${requestScope.moccaParam.appletWidth}" default="${defaultWidth}"/>; + var height = <c:out value="${requestScope.moccaParam.appletHeight}" default="${defaultHeight}"/>; + var buttonWidth = <c:out value="${defaultButtonWidth}"/>; + var buttonHeight = <c:out value="${defaultButtonHeight}"/>; + var buttons = ["incButton", "decButton", "helpButton"]; + function focusToBrowser() { + document.getElementById("focus").focus(); + } + function focusToApplet() { + var applet = document.getElementById("moccaapplet"); + if (applet != null) { + applet.getFocusFromBrowser(); } - - // disable applet caching - boolean disableAppletCaching = false; - String codebase = "applet"; - - if (disableAppletCaching) { - // run in AppletDispatcher context and - // append random alphanumeric string to avoid applet caching - // TODO prepend ../ to all xxxURL applet paramaters - codebase += "/" + AppletDispatcher.DISPATCH_CTX; - String rand = AppletDispatcher.RAND_PREFIX + - RandomStringUtils.randomAlphanumeric(16); - appletArchive += rand; + } + function resize(factor) { + width = Math.ceil(width * factor); + height = Math.ceil(height * factor); + var container = document.getElementById("container"); + if (container != null) { + container.style.width = width + "px"; } - - %> - <body id="appletpage" style="width:<%=width%>px"> - - - <div id="container" style="float: left; width: <%= width %>"> - - <form name="increaseform" action="javascript:increaseSize()" method="get"> - - <!-- increase font size image --> - <input type="image" src="img/inc.png" alt="Text vergrößern" width="13px" height="18px" style="float: left;" id="increase_image"/> - - </form> - - - <form name="decreaseform" action="javascript:decreaseSize()" method="get"> - - <!-- decrease font size image --> - <input type="image" src="img/dec.png" alt="Text verkleinern" width="13px" height="18px" style="float: left;" id="decrease_image"/> - - </form> - - - - <form name="helpform" action="help/index.html" method="get" target="_new" - onsubmit="this.action=document.moccaapplet.getHelpURL(); this.submit(); return false;"> - - <!-- invisible input --> - <input type="image" src="img/help.png" alt=" " width="0px" height="0px" style="float: left;" onFocus="focusToApplet()"/> - - <!-- help image --> - <input type="image" src="img/help.png" alt="Hilfe" width="13px" height="18px" style="float: right;" id="helpimage"/> - - - </form> - - - - <script type="text/javascript"> - - if (!deployJava.versionCheck('1.6.0_04+')) { - document.write('<p>Diese Anwendung benötigt Version 6 Update 4 oder höher der <a href="" onclick="deployJava.installLatestJRE();">Java™ Laufzeitumgebung</a>.</p>'); + var applet = document.getElementById("moccaapplet"); + if (applet != null) { + applet.width = width; + applet.height = height; + } + buttonWidth = Math.ceil(buttonWidth * factor); + buttonHeight = Math.ceil(buttonHeight * factor); + for (var b in buttons) { + var button = document.getElementById(buttons[b]); + if (button != null) { + button.style.width = buttonWidth + "px"; + button.style.height = buttonHeight + "px"; + } + } + fontSize *= factor; + document.body.style.fontSize = fontSize + "%"; + } + </script> + </head> + <body> + <div id="container"> + <a href="#" id="focus" onclick="resize(1.2); return false;" style="float: left;"><img alt="<fmt:message key="incTextSize"/>" src="img/inc.png" id="incButton" class="button"></a> + <a href="#" onclick="resize(1/1.2); return false;" style="float: left;"><img alt="<fmt:message key="decTextSize"/>" src="img/dec.png" id="decButton" class="button"></a> + <a href="<c:out value="${helpUrl}"/>" onclick="this.href = document.moccaapplet.getHelpURL(); return true;" target="_new" style="float: right;"><img alt="<fmt:message key="help"/>" src="img/help.png" id="helpButton" class="button"></a> + <div id="message" style="display: none;"> + <p><fmt:message key="javaPluginRequired"/></p> + <p style="text-align: right;"> + <a style="width: 90%; font-size: 100%" href="http://www.java.com" onclick="deployJava.installLatestJRE(); return false;"><fmt:message key="installJava"/></a> + </p> + </div><script type="text/javascript"> + if (iframe) { + document.getElementById("buttons").style.visibility = "hidden"; + } + if (!deployJava.versionCheck('<c:out value="${minJavaVersion}+"/>')) { + document.getElementById("message").style.display = "block"; } else { var attributes = { - codebase :'<%=codebase%>', - code : '<%=appletClass%>', - archive : '<%=appletArchive +".jar"%>', - width : <%=width%>, - height :<%=height%>, + codebase :'<c:out value="${codebaseUrl}"/>', + code : '<c:out value="${appletClass}"/>', + archive : '<c:out value="${appletArchive}"/>', + width : <c:out value="${requestScope.moccaParam.appletWidth}" default="${defaultWidth}"/>, + height : <c:out value="${requestScope.moccaParam.appletHeight}" default="${defaultHeight}"/>, name : 'moccaapplet', id : 'moccaapplet' }; var parameters = { - GuiStyle : '<%=guiStyle%>', - Locale : '<%=locale%>', - Background : '<%=backgroundImg%>', - BackgroundColor : '<%=backgroundColor%>', - WSDL_URL : '../stal;jsessionid=<%=sessionId%>?wsdl', - HelpURL : 'help/', - SessionID : '<%=sessionId%>', - RedirectURL : '../bkuResult', + GuiStyle : '<c:out value="${requestScope.moccaParam.guiStyle}" default="simple"/>', + Locale : '<c:out value="${requestScope.moccaParam.locale}" default=""/>', + Background : '<c:out value="${requestScope.moccaParam.appletBackground}" default=""/>', + BackgroundColor : '<c:out value="${requestScope.moccaParam.appletBackgroundColor}" default="#eeeeee"/>', + WSDL_URL : '<c:out value="${wsdlUrl}"/>', + HelpURL : '<c:out value="${helpUrl}"/>', + SessionID : '<c:out value="${requestScope.id}"/>', + RedirectURL : '<c:out value="${resultUrl}"/>', RedirectTarget: '_parent', EnforceRecommendedPINLength: 'true' }; - deployJava.runApplet(attributes, parameters, '1.6.0_04'); + deployJava.runApplet(attributes, parameters, '<c:out value="${minJavaVersion}"/>'); } - - </script> - - - - </div> - - </body> - - <script> - - - - function focusToBrowser() { - - // put focus to window - // focus can be assigned to any focusable field on the embedding website - - //alert("Put focus to browser.."); - //self.focus(); - document.getElementById("helpimage").focus(); - - } - - function focusToApplet() { - - //alert('try to set focus to applet'); - if (document != null && document.moccaapplet != null) { - - //alert('set focus to applet.'); - document.moccaapplet.getFocusFromBrowser(); - return true; - } - } - - - function increaseSize() { - - var appwidth = document.moccaapplet.width; - var appheight = document.moccaapplet.height; - - document.moccaapplet.width = (appwidth * 1.2); - document.moccaapplet.height = (appheight * 1.2); - - document.getElementById("container").style.width = (appwidth * 1.2); - - // TODO: This does not work in firefox, seems that width and height attributes cannot be read - // and set from input of type image - var image_width = document.getElementById("increase_image").width; - var image_height = document.getElementById("increase_image").height; - - - document.getElementById("helpimage").width = (image_width * 1.2); - document.getElementById("helpimage").height = (image_height * 1.2); - - document.getElementById("increase_image").width = (image_width * 1.2); - document.getElementById("increase_image").height = (image_height * 1.2); - - document.getElementById("decrease_image").width = (image_width * 1.2); - document.getElementById("decrease_image").height = (image_height * 1.2); - - - } - - function decreaseSize() { - - var appwidth = document.moccaapplet.width; - var appheight = document.moccaapplet.height; - - document.moccaapplet.width = (appwidth * 0.8333333333333); - document.moccaapplet.height = (appheight * 0.8333333333333); - - document.getElementById("container").style.width = (appwidth * 0.8333333333333); - - // TODO: This does not work in firefox, seems that width and height attributes cannot be read - // and set from input of type image - var image_width = document.getElementById("increase_image").width; - var image_height = document.getElementById("increase_image").height; - - - document.getElementById("helpimage").width = (image_width * 0.8333333333333); - document.getElementById("helpimage").height = (image_height * 0.8333333333333); - - document.getElementById("increase_image").width = (image_width * 0.8333333333333); - document.getElementById("increase_image").height = (image_height * 0.8333333333333); - - document.getElementById("decrease_image").width = (image_width * 0.8333333333333); - document.getElementById("decrease_image").height = (image_height * 0.8333333333333); - - - } - - </script> - + </script></div> + </body> </html> +</fmt:bundle>
\ No newline at end of file diff --git a/BKUOnline/src/main/webapp/css/applet.css b/BKUOnline/src/main/webapp/css/applet.css deleted file mode 100644 index d2c734a1..00000000 --- a/BKUOnline/src/main/webapp/css/applet.css +++ /dev/null @@ -1,15 +0,0 @@ -root { - display: block; -} - -body { - background: #ffffff; - /*background-image: url(../img/mocca-t_s.png);*/ - padding: 0; - margin: 0; - border-style: none; - /* - width:<%=width%> - */ -} - diff --git a/BKUOnline/src/main/webapp/css/appletAlternative.css b/BKUOnline/src/main/webapp/css/appletAlternative.css deleted file mode 100644 index ce11f1b2..00000000 --- a/BKUOnline/src/main/webapp/css/appletAlternative.css +++ /dev/null @@ -1,12 +0,0 @@ -root { - display: block; -} - -body { - background: #ffffff; - background-image: url(../img/mocca-t_s.png); - padding: 0; - margin: 0; - border-style: none; -} - diff --git a/BKUOnline/src/main/webapp/expired.html b/BKUOnline/src/main/webapp/expired.jsp index 2bb961f5..d7a8d7e6 100644 --- a/BKUOnline/src/main/webapp/expired.html +++ b/BKUOnline/src/main/webapp/expired.jsp @@ -14,16 +14,18 @@ See the License for the specific language governing permissions and limitations under the License. --> +<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> +<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%-- Messages --%> +<fmt:bundle basename="web"> <!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=ISO-8859-1"> -<title>Session Expired</title> -</head> -<body> - <p> - Ihre Sitzung ist abgelaufen. - <!--Ein neuer BKU request kann im <a href="HTTP-ohne.html">Requestformular</a> erstellt werden.--> - </p> -</body> -</html>
\ No newline at end of file + <head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> + <title><fmt:message key="expiredTitle"/></title> + </head> + <body> + <p><fmt:message key="expiredMessage"/></p> + </body> +</html> +</fmt:bundle>
\ No newline at end of file diff --git a/BKUOnline/src/main/webapp/img/dec.png b/BKUOnline/src/main/webapp/img/dec.png Binary files differindex 87693cf4..c0b85e84 100644 --- a/BKUOnline/src/main/webapp/img/dec.png +++ b/BKUOnline/src/main/webapp/img/dec.png diff --git a/BKUOnline/src/main/webapp/img/help.png b/BKUOnline/src/main/webapp/img/help.png Binary files differindex 5d6da3bf..ecb36e63 100644 --- a/BKUOnline/src/main/webapp/img/help.png +++ b/BKUOnline/src/main/webapp/img/help.png diff --git a/BKUOnline/src/main/webapp/img/inc.png b/BKUOnline/src/main/webapp/img/inc.png Binary files differindex 26e58b80..960f710d 100644 --- a/BKUOnline/src/main/webapp/img/inc.png +++ b/BKUOnline/src/main/webapp/img/inc.png diff --git a/BKUOnline/src/main/webapp/js/deployJava_orig.js b/BKUOnline/src/main/webapp/js/deployJava_orig.js deleted file mode 100644 index 316fa278..00000000 --- a/BKUOnline/src/main/webapp/js/deployJava_orig.js +++ /dev/null @@ -1,725 +0,0 @@ -/* - * Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * - Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * - Neither the name of Sun Microsystems nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS - * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, - * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * Added by EGIZ: - * This file contains workarounds to - * [#423] Firefox 3.0.11 bug #498132 causes applet loading failure - * (lines 95-99) - * [#424] Web Start loading via java plugin (Sun deployment script) fails on WinXP/Vista - * (lines 501-506) - * - * features: - * [#425] Disable WebStart Launch Button for MacOS - * (lines 492-504) - * - */ - -/* - * deployJava.js - * - * This file is part of the Deployment Toolkit. It provides functions for web - * pages to detect the presence of a JRE, install the latest JRE, and easily run - * applets or Web Start programs. Usage guide may be found at http://<TBD>/. - * - * The "live" copy of this file may be found at - * http://java.com/js/deployJava.js. - * You are encouraged to link directly to the live copy of the file. - * - * @version @(#)deployJava.js XXXXX - */ - -var deployJava={ - debug:null, - - myInterval:null, - preInstallJREList:null, - returnPage:null, - brand:null, - locale:null, - installType:null, - - EAInstallEnabled:false, - EarlyAccessURL:null, - - // GetJava page - getJavaURL:'http://java.sun.com/webapps/getjava/BrowserRedirect?host=java.com', - - // Apple redirect page - appleRedirectPage:'http://www.apple.com/support/downloads/', - oldMimeType:'application/npruntime-scriptable-plugin;DeploymentToolkit', - mimeType:'application/java-deployment-toolkit', - launchButtonPNG:'http://java.sun.com/products/jfc/tsc/articles/swing2d/webstart.png', - - getJREs:function(){ - var list=new Array(); - if(deployJava.isPluginInstalled()){ - var plugin=deployJava.getPlugin(); - var VMs=plugin.jvms; - for(var i=0;i<VMs.getLength();i++){ - list[i]=VMs.get(i).version; - } - }else{ - var browser=deployJava.getBrowser(); - - if(browser=='MSIE'){ - if(deployJava.testUsingActiveX('1.8.0')){ - list[0]='1.8.0'; - }else if(deployJava.testUsingActiveX('1.7.0')){ - list[0]='1.7.0'; - }else if(deployJava.testUsingActiveX('1.6.0')){ - list[0]='1.6.0'; - }else if(deployJava.testUsingActiveX('1.5.0')){ - list[0]='1.5.0'; - }else if(deployJava.testUsingActiveX('1.4.2')){ - list[0]='1.4.2'; - }else if(deployJava.testForMSVM()){ - list[0]='1.1'; - } - } - else if(browser=='Netscape Family'){ - if(deployJava.testUsingMimeTypes('1.8')){ - list[0]='1.8.0'; - }else if(deployJava.testUsingMimeTypes('1.7')){ - list[0]='1.7.0'; - }else if(deployJava.testUsingMimeTypes('1.6')){ - list[0]='1.6.0'; - }else if(deployJava.testUsingMimeTypes('1.5')){ - list[0]='1.5.0'; - }else if(deployJava.testUsingMimeTypes('1.4.2')){ - list[0]='1.4.2'; - } - }else if(browser=='Safari'){ - if(deployJava.testUsingPluginsArray('1.8.0')){ - list[0]='1.8.0'; - }else if(deployJava.testUsingPluginsArray('1.7.0')){ - list[0]='1.7.0'; - }else if(deployJava.testUsingPluginsArray('1.6.0')){ - list[0]='1.6.0'; - }else if(deployJava.testUsingPluginsArray('1.5.0')){ - list[0]='1.5.0'; - }else if(deployJava.testUsingPluginsArray('1.4.2')){ - list[0]='1.4.2'; - } - } - } - - if(deployJava.debug){ - for(var i=0;i<list.length;++i){ - alert('We claim to have detected Java SE '+list[i]); - } - } - - return list; - }, - - installJRE:function(requestVersion){ - var ret=false; - if(deployJava.isPluginInstalled()){ - if(deployJava.getPlugin().installJRE(requestVersion)){ - deployJava.refresh(); - if(deployJava.returnPage!=null){ - document.location=deployJava.returnPage; - } - return true; - }else{ - return false; - } - }else{ - return deployJava.installLatestJRE(); - } - }, - - installLatestJRE:function(){ - if(deployJava.isPluginInstalled()){ - if(deployJava.getPlugin().installLatestJRE()){ - deployJava.refresh(); - if(deployJava.returnPage!=null){ - document.location=deployJava.returnPage; - } - return true; - }else{ - return false; - } - }else{ - var browser=deployJava.getBrowser(); - var platform=navigator.platform.toLowerCase(); - if((deployJava.EAInstallEnabled=='true') && - (platform.indexOf('win')!=-1) && - (deployJava.EarlyAccessURL!=null)) { - - deployJava.preInstallJREList=deployJava.getJREs(); - if(deployJava.returnPage!=null){ - deployJava.myInterval= - setInterval("deployJava.poll()",3000); - } - - location.href=deployJava.EarlyAccessURL; - return false; - }else{ - if(browser=='MSIE'){ - return deployJava.IEInstall(); - }else if((browser=='Netscape Family')&& - (platform.indexOf('win32')!=-1)){ - return deployJava.FFInstall(); - }else{ - location.href=deployJava.getJavaURL+ - ((deployJava.returnPage!=null)? - ('&returnPage='+deployJava.returnPage):'')+ - ((deployJava.locale!=null)? - ('&locale='+deployJava.locale):'')+ - ((deployJava.brand!=null)? - ('&brand='+deployJava.brand):''); - } - return false; - } - } - }, - - runApplet:function(attributes,parameters,minimumVersion){ - if(minimumVersion=='undefined'||minimumVersion==null){ - minimumVersion='1.1'; - } - - var regex="^(\\d+)(?:\\.(\\d+)(?:\\.(\\d+)(?:_(\\d+))?)?)?$"; - - var matchData=minimumVersion.match(regex); - - if(deployJava.returnPage==null){ - deployJava.returnPage=document.location; - } - - if(matchData!=null){ - var browser=deployJava.getBrowser(); - if((browser!='?')&&(browser!='Safari')){ - if(deployJava.versionCheck(minimumVersion+'+')){ - deployJava.writeAppletTag(attributes,parameters); - }else if(deployJava.installJRE(minimumVersion+'+')){ - deployJava.refresh(); - location.href=document.location; - deployJava.writeAppletTag(attributes,parameters); - } - }else{ - deployJava.writeAppletTag(attributes,parameters); - } - }else{ - if(deployJava.debug){ - alert('Invalid minimumVersion argument to runApplet():'+ - minimumVersion); - } - } - }, - - writeAppletTag:function(attributes,parameters){ - var s='<'+'applet '; - for(var attribute in attributes){ - s+=(' '+attribute+'="'+attributes[attribute]+'"'); - } - s+='>'; - document.write(s); - - if(parameters!='undefined'&¶meters!=null){ - var codebaseParam=false; - for(var parameter in parameters){ - if(parameter=='codebase_lookup'){ - codebaseParam=true; - } - s='<param name="'+parameter+'" value="'+ - parameters[parameter]+'">'; - document.write(s); - } - if(!codebaseParam){ - document.write('<param name="codebase_lookup" value="false">'); - } - } - document.write('<'+'/'+'applet'+'>'); - }, - - versionCheck:function(versionPattern) - - { - var index=0; - var regex="^(\\d+)(?:\\.(\\d+)(?:\\.(\\d+)(?:_(\\d+))?)?)?(\\*|\\+)?$"; - - var matchData=versionPattern.match(regex); - - if(matchData!=null){ - var familyMatch=true; - - var patternArray=new Array(); - - for(var i=1;i<matchData.length;++i){ - if((typeof matchData[i]=='string')&&(matchData[i]!='')){ - patternArray[index]=matchData[i]; - index++; - } - } - - if(patternArray[patternArray.length-1]=='+'){ - familyMatch=false; - patternArray.length--; - }else{ - if(patternArray[patternArray.length-1]=='*'){ - patternArray.length--; - } - } - - var list=deployJava.getJREs(); - for(var i=0;i<list.length;++i){ - if(deployJava.compareVersionToPattern(list[i],patternArray, - familyMatch)){ - return true; - } - } - - return false; - }else{ - alert('Invalid versionPattern passed to versionCheck: '+ - versionPattern); - return false; - } - }, - - isWebStartInstalled:function(minimumVersion){ - - var browser=deployJava.getBrowser(); - if((browser=='?')||(browser=='Safari')){ - return true; - } - - if(minimumVersion=='undefined'||minimumVersion==null){ - minimumVersion='1.4.2'; - } - - var retval=false; - var regex="^(\\d+)(?:\\.(\\d+)(?:\\.(\\d+)(?:_(\\d+))?)?)?$"; - var matchData=minimumVersion.match(regex); - - if(matchData!=null){ - retval=deployJava.versionCheck(minimumVersion+'+'); - }else{ - if(deployJava.debug){ - alert('Invalid minimumVersion argument to isWebStartInstalled(): '+minimumVersion); - } - retval=deployJava.versionCheck('1.4.2+'); - } - return retval; - }, - - createWebStartLaunchButton:function(jnlp,minimumVersion){ - - if(deployJava.returnPage==null){ - deployJava.returnPage=jnlp; - } - var url='javascript:'+'if (!deployJava.isWebStartInstalled("'+ - minimumVersion+'")) {'+'if (deployJava.installLatestJRE()) {'+'if (deployJava.launch("'+jnlp+'")) {}'+'}'+'} else {'+'if (deployJava.launch("'+jnlp+'")) {}'+'}';document.write('<'+'a href="'+url+'" onMouseOver="window.status=\'\'; '+'return true;"><'+'img '+'src="'+deployJava.launchButtonPNG+'" '+'border="0" /><'+'/'+'a'+'>'); - }, - - launch:function(jnlp){ - if(deployJava.isPluginInstalled()){ - return deployJava.getPlugin().launch(jnlp); - }else{ - document.location=jnlp;return true; - } - }, - - isPluginInstalled:function(){ - var plugin=deployJava.getPlugin(); - if(plugin&&plugin.jvms){ - return true; - }else{ - return false; - } - }, - - isAutoUpdateEnabled:function(){ - if(deployJava.isPluginInstalled()){ - return deployJava.getPlugin().isAutoUpdateEnabled(); - } - return false; - }, - - setAutoUpdateEnabled:function(){ - if(deployJava.isPluginInstalled()){ - return deployJava.getPlugin().setAutoUpdateEnabled(); - } - return false; - }, - - setInstallerType:function(type){ - deployJava.installType=type; - if(deployJava.isPluginInstalled()){ - return deployJava.getPlugin().setInstallerType(type); - } - return false; - }, - - setAdditionalPackages:function(packageList){ - if(deployJava.isPluginInstalled()){ - return deployJava.getPlugin().setAdditionalPackages( - packageList); - } - return false; - }, - - setEarlyAccess:function(enabled){ - deployJava.EAInstallEnabled=enabled; - }, - - isPlugin2:function(){ - if(deployJava.isPluginInstalled()){ - if(deployJava.versionCheck('1.6.0_10+')){ - try{ - return deployJava.getPlugin().isPlugin2(); - }catch(err){ - - } - } - } - return false; - }, - - - getPlugin:function(){ - deployJava.refresh(); - var ret=document.getElementById('deployJavaPlugin'); - return ret; - }, - - compareVersionToPattern:function(version,patternArray,familyMatch){ - var regex="^(\\d+)(?:\\.(\\d+)(?:\\.(\\d+)(?:_(\\d+))?)?)?$"; - var matchData=version.match(regex); - - if(matchData!=null){ - var index=0; - var result=new Array(); - - for(var i=1;i<matchData.length;++i){ - if((typeof matchData[i]=='string')&&(matchData[i]!='')) - { - result[index]=matchData[i]; - index++; - } - } - - var l=Math.min(result.length,patternArray.length); - - if(familyMatch){ - for(var i=0;i<l;++i){ - if(result[i]!=patternArray[i])return false; - } - - return true; - }else{ - for(var i=0;i<l;++i){ - if(result[i]<patternArray[i]){ - return false; - }else if(result[i]>patternArray[i]){ - return true; - } - } - - return true; - } - }else{ - return false; - } - }, - - - getBrowser:function(){ - var browser=navigator.userAgent.toLowerCase(); - - if(deployJava.debug){ - alert('userAgent -> '+browser); - } - - if((navigator.vendor)&& - (navigator.vendor.toLowerCase().indexOf('apple')!=-1)&& - (browser.indexOf('safari')!=-1)){ - if(deployJava.debug){ - alert('We claim to have detected "Safari".'); - } - return'Safari'; - }else if(browser.indexOf('msie')!=-1){ - if(deployJava.debug){ - alert('We claim to have detected "IE".'); - } - return'MSIE'; - }else if((browser.indexOf('mozilla')!=-1)|| - (browser.indexOf('firefox')!=-1)){ - if(deployJava.debug){ - alert('We claim to have detected a Netscape family browser.'); - } - return'Netscape Family'; - }else{ - if(deployJava.debug){ - alert('We claim to have failed to detect a browser.'); - } - return'?'; - } - }, - - - testUsingActiveX:function(version){ - var objectName='JavaWebStart.isInstalled.'+version+'.0'; - - if(!ActiveXObject){ - if(deployJava.debug){ - alert('Browser claims to be IE, but no ActiveXObject object?'); - } - return false; - } - - try{ - return(new ActiveXObject(objectName)!=null); - }catch(exception){ - return false; - } - }, - - - testForMSVM:function(){ - var clsid='{08B0E5C0-4FCB-11CF-AAA5-00401C608500}'; - - if(typeof oClientCaps!='undefined'){ - var v=oClientCaps.getComponentVersion(clsid,"ComponentID"); - if((v=='')||(v=='5,0,5000,0')){ - return false; - }else{ - return true; - } - }else{ - return false; - } - }, - - - testUsingMimeTypes:function(version){ - if(!navigator.mimeTypes){ - if(deployJava.debug){ - alert('Browser claims to be Netscape family, but no mimeTypes[] array?'); - } - return false; - } - - for(var i=0;i<navigator.mimeTypes.length;++i){ - s=navigator.mimeTypes[i].type; - var m=s.match(/^application\/x-java-applet\x3Bversion=(1\.8|1\.7|1\.6|1\.5|1\.4\.2)$/); - if(m!=null){ - if(deployJava.compareVersions(m[1],version)){ - return true; - } - } - } - return false; - }, - - - testUsingPluginsArray:function(version){ - if((!navigator.plugins)||(!navigator.plugins.length)){ - return false; - } - var platform=navigator.platform.toLowerCase(); - for(var i=0;i<navigator.plugins.length;++i){ - s=navigator.plugins[i].description; - - if(s.search(/^Java Switchable Plug-in (Cocoa)/)!=-1){ - if(deployJava.compareVersions("1.5.0",version)){ - return true; - } - }else if(s.search(/^Java/)!=-1){ - if(platform.indexOf('win')!=-1){ - if(deployJava.compareVersions("1.5.0",version)||deployJava.compareVersions("1.6.0",version)){ - return true; - } - } - } - } - if(deployJava.compareVersions("1.5.0",version)){ - return true; - } - return false; - }, - - IEInstall:function(){ - - location.href=deployJava.getJavaURL+ - ((deployJava.returnPage!=null)? - ('&returnPage='+deployJava.returnPage):'')+ - ((deployJava.locale!=null)? - ('&locale='+deployJava.locale):'')+ - ((deployJava.brand!=null)?('&brand='+deployJava.brand):'')+ - ((deployJava.installType!=null)? - ('&type='+deployJava.installType):''); - return false; - }, - - done:function(name,result){ - }, - - FFInstall:function(){ - - location.href=deployJava.getJavaURL+ - ((deployJava.returnPage!=null)? - ('&returnPage='+deployJava.returnPage):'')+ - ((deployJava.locale!=null)? - ('&locale='+deployJava.locale):'')+ - ((deployJava.brand!=null)?('&brand='+deployJava.brand):'')+ - ((deployJava.installType!=null)? - ('&type='+deployJava.installType):''); - return false; - }, - - compareVersions:function(installed,required){ - - var a=installed.split('.'); - var b=required.split('.'); - - for(var i=0;i<a.length;++i){ - a[i]=Number(a[i]); - } - for(var i=0;i<b.length;++i){ - b[i]=Number(b[i]); - } - if(a.length==2){ - a[2]=0; - } - - if(a[0]>b[0])return true; - if(a[0]<b[0])return false; - - if(a[1]>b[1])return true; - if(a[1]<b[1])return false; - - if(a[2]>b[2])return true; - if(a[2]<b[2])return false; - - return true; - }, - - - enableAlerts:function(){ - deployJava.debug=true; - }, - - poll:function(){ - - deployJava.refresh(); - var postInstallJREList=deployJava.getJREs(); - - if((deployJava.preInstallJREList.length==0)&& - (postInstallJREList.length!=0)){ - clearInterval(deployJava.myInterval); - if(deployJava.returnPage!=null){ - location.href=deployJava.returnPage; - }; - } - - if((deployJava.preInstallJREList.length!=0)&& - (postInstallJREList.length!=0)&& - (deployJava.preInstallJREList[0]!=postInstallJREList[0])){ - clearInterval(deployJava.myInterval); - if(deployJava.returnPage!=null){ - location.href=deployJava.returnPage; - } - } - - }, - - writePluginTag:function(){ - var browser=deployJava.getBrowser(); - if(browser=='MSIE'){ - document.write('<'+ - 'object classid="clsid:CAFEEFAC-DEC7-0000-0000-ABCDEFFEDCBA" '+ - 'id="deployJavaPlugin" width="0" height="0">'+ - '<'+'/'+'object'+'>'); - }else if(browser=='Netscape Family'){ - deployJava.writeEmbedTag(); - } - }, - - refresh:function(){ - navigator.plugins.refresh(false);var browser=deployJava.getBrowser();if(browser=='Netscape Family'){ - var plugin=document.getElementById('deployJavaPlugin');if(plugin==null){ - deployJava.writeEmbedTag(); - } - } - }, - - writeEmbedTag:function(){ - var written=false;if(navigator.mimeTypes!=null){ - for(var i=0;i<navigator.mimeTypes.length;i++){ - if(navigator.mimeTypes[i].type==deployJava.mimeType){ - if(navigator.mimeTypes[i].enabledPlugin){ - document.write('<'+'embed id="deployJavaPlugin" type="'+ - deployJava.mimeType+'" hidden="true" />');written=true; - } - } - } - if(!written)for(var i=0;i<navigator.mimeTypes.length;i++){ - if(navigator.mimeTypes[i].type==deployJava.oldMimeType){ - if(navigator.mimeTypes[i].enabledPlugin){ - document.write('<'+'embed id="deployJavaPlugin" type="'+ - deployJava.oldMimeType+'" hidden="true" />'); - } - } - } - } - }, - - do_initialize:function(){ - deployJava.writePluginTag(); - if(deployJava.locale==null){ - var loc=null; - - if(loc==null)try{ - loc=navigator.userLanguage; - }catch(err){} - - if(loc==null)try{ - loc=navigator.systemLanguage; - }catch(err){} - - if(loc==null)try{ - loc=navigator.language; - }catch(err){} - - if(loc!=null){ - loc.replace("-","_") - deployJava.locale=loc; - } - } - } - - }; - deployJava.do_initialize(); - diff --git a/BKUOnline/src/main/webapp/local.jsp b/BKUOnline/src/main/webapp/local.jsp index 48d62674..16e408c0 100644 --- a/BKUOnline/src/main/webapp/local.jsp +++ b/BKUOnline/src/main/webapp/local.jsp @@ -14,50 +14,66 @@ See the License for the specific language governing permissions and limitations under the License. --> -<%@ page language="java" contentType="text/html; charset=UTF-8" - pageEncoding="UTF-8" - import="at.gv.egiz.bku.online.webapp.AppletDispatcher,org.apache.commons.lang.RandomStringUtils,org.apache.commons.lang.StringEscapeUtils" %> - +<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> +<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<c:set var="defaultWidth" value="190"/> +<c:set var="defaultHeight" value="130"/> +<%-- URLs --%> +<c:url value="/DataURLServer" var="dataUrl"/> +<%-- Messages --%> +<fmt:bundle basename="web"> <!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>MOCCA</title> - <link rel="shortcut icon" href="img/chip16.ico" type="image/x-icon"> - <style type="text/css" media="all">@import "css/applet.css";</style> - - <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE"> - <META HTTP-EQUIV="EXPIRES" CONTENT="Mon, 22 Jul 2002 11:12:01 GMT"> - <META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE"> - </head> - <% - int width = session.getAttribute("appletWidth") == null ? 190 - : (Integer) session.getAttribute("appletWidth"); - int height = session.getAttribute("appletHeight") == null ? 130 - : (Integer) session.getAttribute("appletHeight"); - String backgroundImg = StringEscapeUtils.escapeJavaScript(session - .getAttribute("appletBackground") == null ? "../img/chip32.png" - : (String) session.getAttribute("appletBackground")); - String backgroundColor = StringEscapeUtils - .escapeJavaScript((String) session - .getAttribute("appletBackgroundColor")); - - String sessionId = StringEscapeUtils.escapeJavaScript(session.getId()); - - String dataURL = request.getRequestURL().toString(); - dataURL = dataURL.substring(0, dataURL.lastIndexOf('/')) + "/DataURLServer"; - %> - <body id="appletpage" style="width:<%=width%>px;height:<%=height%>px"> - <div style="width:<%=width%>px;height:<%=height%>px"> - <form action="http://127.0.0.1:3495/http-security-layer-request" method="post" enctype="application/x-www-form-urlencoded"> - <input name="SessionID_" value="<%=sessionId%>" type="hidden"/> - <input name="DataURL" value="<%=dataURL%>" id="DataURL" type="hidden"/> - <input name="XMLRequest" value="<NullOperationRequest xmlns='http://www.buergerkarte.at/namespaces/securitylayer/1.2#'/>" type="hidden"/> - <p>Anfrage wird an lokale BKU gesendet</p> - <div style="text-align: center;"> - <input type="submit" style="vertical-align: middle"/> - </div> - </form> - </div> - </body> + <head> + <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"> + <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE"> + <META HTTP-EQUIV="EXPIRES" CONTENT="Mon, 22 Jul 2002 11:12:01 GMT"> + <META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE"> + <title><fmt:message key="title"/></title> + <link rel="shortcut icon" href="img/chip16.ico" type="image/x-icon"> + <style type="text/css" media="all"> + root { + display: block; + } + body { + background: #ffffff; + padding: 0; + margin: 0; + width: <c:out value="${requestScope.moccaParam.appletWidth}" default="${defaultWidth}"/>px; + height: <c:out value="${requestScope.moccaParam.appletHeight}" default="${defaultHeight}"/>px; + } + #container { + padding: 0; + margin: 0; + width: <c:out value="${requestScope.moccaParam.appletWidth}" default="${defaultWidth}"/>px; + background: <c:out value="${requestScope.moccaParam.appletBackgroundColor}" default="#eeeeee"/>; + } + #message { + margin: 0; + padding: 0.25em 0 0.25em 0; + clear: both; + } + #message p{ + margin: 0; + padding: 0.25em 0.5em 0.25em 0.5em; + } + </style> + </head> + <body> + <div id="container"> + <form action="http://localhost:3495/http-security-layer-request" method="post" enctype="application/x-www-form-urlencoded"> + <input name="SessionID_" value="${requestScope.id}" type="hidden"/> + <input name="DataURL" value="${dataUrl}" id="DataURL" type="hidden"/> + <input name="XMLRequest" value="<NullOperationRequest xmlns='http://www.buergerkarte.at/namespaces/securitylayer/1.2#'/>" type="hidden"/> + <div id="message"> + <p><fmt:message key="local"/></p> + <p style="text-align: right;"> + <input type="submit" style="vertical-align: middle"/> + </p> + </div> + </form> + </div> + </body> </html> +</fmt:bundle> |