From 5e10b6b575993c78ac22191849c464b618c4fa8a Mon Sep 17 00:00:00 2001 From: mcentner Date: Wed, 14 Jul 2010 15:22:56 +0000 Subject: MOCCA Online HTTP binding refactored. git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@762 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- BKUOnline/src/main/webapp/WEB-INF/web.xml | 263 ++++---- BKUOnline/src/main/webapp/applet.jsp | 391 ++++++----- BKUOnline/src/main/webapp/css/applet.css | 15 - .../src/main/webapp/css/appletAlternative.css | 12 - BKUOnline/src/main/webapp/expired.html | 29 - BKUOnline/src/main/webapp/expired.jsp | 31 + BKUOnline/src/main/webapp/img/dec.png | Bin 6311 -> 309 bytes BKUOnline/src/main/webapp/img/help.png | Bin 303 -> 185 bytes BKUOnline/src/main/webapp/img/inc.png | Bin 7198 -> 344 bytes BKUOnline/src/main/webapp/js/deployJava_orig.js | 725 --------------------- BKUOnline/src/main/webapp/local.jsp | 104 +-- 11 files changed, 415 insertions(+), 1155 deletions(-) delete mode 100644 BKUOnline/src/main/webapp/css/applet.css delete mode 100644 BKUOnline/src/main/webapp/css/appletAlternative.css delete mode 100644 BKUOnline/src/main/webapp/expired.html create mode 100644 BKUOnline/src/main/webapp/expired.jsp delete mode 100644 BKUOnline/src/main/webapp/js/deployJava_orig.js (limited to 'BKUOnline/src/main/webapp') 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 @@ - - - http-security-layer-request - - - at.gv.egiz.bku.online.webapp.MoccaContextListener - - - + + MOCCA Online + + at.gv.egiz.bku.online.webapp.MoccaContextListener + org.springframework.web.context.ContextLoaderListener + configurationResource - - - - - at.gv.egiz.bku.online.webapp.SessionListener - - - com.sun.xml.ws.transport.http.servlet.WSServletContextListener - - - BKUServlet - at.gv.egiz.bku.online.webapp.BKURequestHandler - - - SAMLServlet - at.gv.egiz.mocca.id.SAMLRequestHandler - - - DataURLServlet - at.gv.egiz.mocca.id.DataURLServerServlet - - - ResultServlet - at.gv.egiz.bku.online.webapp.ResultServlet - - responseEncoding - UTF-8 - - - expiredPage - expired.html - - + + at.gv.egiz.bku.online.webapp.SessionListener + + + com.sun.xml.ws.transport.http.servlet.WSServletContextListener + + + + HTTPSecurityLayerServlet + at.gv.egiz.bku.online.webapp.WebRequestHandler + + protocol + HTTP + + + + + UIServlet + at.gv.egiz.bku.online.webapp.UIServlet + + + uiPage + applet.jsp + + + + expiredPageUrl + expired.jsp + + + + ResultServlet + at.gv.egiz.bku.online.webapp.ResultServlet + + responseEncoding + UTF-8 + + + + expiredPageUrl + expired.jsp + + + STALService com.sun.xml.ws.transport.http.servlet.WSServlet 1 + + + + + + + + + + + + - BKUServlet + HTTPSecurityLayerServlet /http-security-layer-request - - BKUServlet - /https-security-layer-request - - - DataURLServlet - /DataURLServer - - - ResultServlet - /bkuResult - - - SAMLServlet - /moccaid - - - DataURLServlet - /DataURLServer - - - - - - - - - - - - - - STALService - /stal - - - 5 - - - index.html - index.jsp - - + + HTTPSecurityLayerServlet + /https-security-layer-request + + + UIServlet + /ui + + + ResultServlet + /result + + + STALService + /stal + + + + + + + + + + + 5 + + + index.html + index.jsp + + + + RequestIdFilter + at.gv.egiz.bku.online.webapp.RequestIdFilter + + + RequestIdFilter + HTTPSecurityLayerServlet + + + RequestIdFilter + UIServlet + + + RequestIdFilter + ResultServlet + + \ 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" %> - - +<%@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 --%> + + + +<%-- Images --%> + + +<%-- URLs --%> + + + + +<%-- Messages --%> + +<%-- 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"/ --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - MOCCA Applet - - - - - - - - - <% - 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"; + + + + + + <fmt:message key="title"/> + + + + + + +
+ <fmt:message key=" src="img/inc.png" id="incButton" class="button"> + <fmt:message key=" src="img/dec.png" id="decButton" class="button"> + " onclick="this.href = document.moccaapplet.getHelpURL(); return true;" target="_new" style="float: right;"><fmt:message key=" src="img/help.png" id="helpButton" class="button"> + - - - -
- - - - - + + +
\ 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.html deleted file mode 100644 index 2bb961f5..00000000 --- a/BKUOnline/src/main/webapp/expired.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - -Session Expired - - -

- Ihre Sitzung ist abgelaufen. - -

- - \ No newline at end of file diff --git a/BKUOnline/src/main/webapp/expired.jsp b/BKUOnline/src/main/webapp/expired.jsp new file mode 100644 index 00000000..d7a8d7e6 --- /dev/null +++ b/BKUOnline/src/main/webapp/expired.jsp @@ -0,0 +1,31 @@ + +<%@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:message key="expiredTitle"/> + + +

+ + +
\ No newline at end of file diff --git a/BKUOnline/src/main/webapp/img/dec.png b/BKUOnline/src/main/webapp/img/dec.png index 87693cf4..c0b85e84 100644 Binary files a/BKUOnline/src/main/webapp/img/dec.png and b/BKUOnline/src/main/webapp/img/dec.png differ diff --git a/BKUOnline/src/main/webapp/img/help.png b/BKUOnline/src/main/webapp/img/help.png index 5d6da3bf..ecb36e63 100644 Binary files a/BKUOnline/src/main/webapp/img/help.png and b/BKUOnline/src/main/webapp/img/help.png differ diff --git a/BKUOnline/src/main/webapp/img/inc.png b/BKUOnline/src/main/webapp/img/inc.png index 26e58b80..960f710d 100644 Binary files a/BKUOnline/src/main/webapp/img/inc.png and b/BKUOnline/src/main/webapp/img/inc.png differ 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:///. - * - * 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'; - document.write(s); - } - if(!codebaseParam){ - document.write(''); - } - } - 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<'+'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;ipatternArray[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;ib[0])return true; - if(a[0]b[1])return true; - if(a[1]b[2])return true; - if(a[2]'+ - '<'+'/'+'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