%@ 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" %>
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";
appletClass = "at.gv.egiz.bku.online.applet.ActivationApplet.class";
} else if ("pin".equalsIgnoreCase(extension)) {
appletArchive = "BKUAppletExt";
appletClass = "at.gv.egiz.bku.online.applet.PINManagementApplet.class";
} else {
appletArchive = "BKUApplet";
appletClass = "at.gv.egiz.bku.online.applet.BKUApplet.class";
}
// 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;
}
%>