summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorclemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2009-05-12 14:46:41 +0000
committerclemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2009-05-12 14:46:41 +0000
commit4af6912e43237c3678f05e30c69385481f42ae76 (patch)
treec81a087bc7b1149dd2ebc590fc2078a29c61a6e2
parenta8af530c64d4612f5a15d66ce71bbfd1c3579ea0 (diff)
downloadmocca-4af6912e43237c3678f05e30c69385481f42ae76.tar.gz
mocca-4af6912e43237c3678f05e30c69385481f42ae76.tar.bz2
mocca-4af6912e43237c3678f05e30c69385481f42ae76.zip
bku web start
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@354 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
-rw-r--r--BKUWebStart/keystore.ksbin0 -> 5635 bytes
-rw-r--r--BKUWebStart/pom.xml239
-rw-r--r--BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/BKULauncher.java221
-rw-r--r--BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/CA.java117
-rw-r--r--BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/Container.java86
-rw-r--r--BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/ui/BKUControllerInterface.java (renamed from utils/src/main/java/at/gv/egiz/bku/local/ui/BKUControllerInterface.java)14
-rw-r--r--BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/ui/TrayIconDialog.java (renamed from utils/src/main/java/at/gv/egiz/bku/local/ui/TrayIconDialog.java)372
-rw-r--r--BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/ui/TrayIconDialogInterface.java (renamed from utils/src/main/java/at/gv/egiz/bku/local/ui/TrayIconDialogInterface.java)32
-rw-r--r--BKUWebStart/src/main/jnlp/resources/logo.pngbin0 -> 2609 bytes
-rw-r--r--BKUWebStart/src/main/jnlp/resources/logo_64x64.pngbin0 -> 2299 bytes
-rw-r--r--BKUWebStart/src/main/jnlp/resources/logo_90x90.pngbin0 -> 3294 bytes
-rw-r--r--BKUWebStart/src/main/jnlp/resources/splash.pngbin0 -> 54978 bytes
-rw-r--r--BKUWebStart/src/main/jnlp/template.xml37
-rw-r--r--BKUWebStart/src/main/resources/at/gv/egiz/bku/webstart/defaultConf/template.zipbin0 -> 24829 bytes
-rw-r--r--BKUWebStart/src/main/resources/at/gv/egiz/bku/webstart/ui/UIMessages.properties13
-rw-r--r--BKUWebStart/src/main/resources/at/gv/egiz/bku/webstart/ui/favicon.pngbin0 -> 2149 bytes
-rw-r--r--BKUWebStart/src/main/resources/at/gv/egiz/bku/webstart/ui/logo.pngbin0 -> 1751 bytes
-rw-r--r--BKUWebStart/src/main/resources/log4j.properties16
-rw-r--r--BKUWebStart/src/main/resources/logo.pngbin0 -> 2299 bytes
-rw-r--r--BKUWebStart/src/main/resources/logo_32x32.pngbin0 -> 1522 bytes
-rw-r--r--BKUWebStart/src/main/resources/logo_90x90.pngbin0 -> 3294 bytes
-rw-r--r--BKUWebStart/src/main/resources/logo_RGB22x22.pngbin0 -> 1751 bytes
-rw-r--r--BKUWebStart/src/main/resources/logo_RGB32x32.pngbin0 -> 2609 bytes
-rw-r--r--BKUWebStart/src/main/resources/splash.pngbin0 -> 54978 bytes
-rw-r--r--BKUWebStart/src/main/webapp/WEB-INF/web.xml7
-rw-r--r--BKUWebStart/src/main/webapp/launch.html17
-rw-r--r--BKUWebStart/src/main/webapp/launch.jnlp30
-rw-r--r--BKUWebStart/src/main/webapp/mocca_tiny.pngbin0 -> 1025 bytes
-rw-r--r--BKUWebStart/src/main/webapp/splash.pngbin0 -> 54978 bytes
-rw-r--r--pom.xml7
30 files changed, 997 insertions, 211 deletions
diff --git a/BKUWebStart/keystore.ks b/BKUWebStart/keystore.ks
new file mode 100644
index 00000000..824c3a40
--- /dev/null
+++ b/BKUWebStart/keystore.ks
Binary files differ
diff --git a/BKUWebStart/pom.xml b/BKUWebStart/pom.xml
new file mode 100644
index 00000000..c61937bb
--- /dev/null
+++ b/BKUWebStart/pom.xml
@@ -0,0 +1,239 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <parent>
+ <artifactId>bku</artifactId>
+ <groupId>at.gv.egiz</groupId>
+ <version>1.1.2-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>at.gv.egiz</groupId>
+ <artifactId>BKUWebStart</artifactId>
+ <packaging>jar</packaging>
+ <name>BKU Web Start</name>
+ <version>1.0-SNAPSHOT</version>
+ <url>http://danu-lin.iaik.tugraz.at:8080/jnlp</url>
+ <description>Web Start Bürgerkartenumgebung (BKU) MOCCA-lokal</description>
+
+ <build>
+
+ <finalName>BKUWebStart</finalName>
+ <plugins>
+
+ <!-- target/jnlp does not yet exist..
+ <plugin>
+ <groupId>org.codehaus.mojo.webstart</groupId>
+ <artifactId>webstart-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>unsign</goal>
+ </goals>
+ <phase>package</phase>
+ </execution>
+ </executions>
+ <configuration>
+ <jarPath>${project.build.directory}/jnlp/lib/iaik_jce_full_signed-3.16.jar</jarPath>
+ <jarPath>${project.build.directory}/jnlp/lib/iaik_ecc_signed-2.15.jar</jarPath>
+ <verbose>true</verbose>
+ </configuration>
+ </plugin>
+ -->
+
+ <!--plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <configuration>
+ <overlays>
+ <overlay>
+ <groupId>at.gv.egiz</groupId>
+ <artifactId>BKULocal</artifactId>
+ <type>war</type>
+ <targetPath>classes/BKULocal</targetPath>
+ </overlay>
+ </overlays>
+ </configuration>
+ </plugin-->
+
+ <plugin>
+ <!-- unpack BKULocal prior to webstart jar generation to include -->
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>unpack-dependencies</id>
+ <phase>package</phase>
+ <goals>
+ <goal>unpack-dependencies</goal>
+ </goals>
+ <configuration>
+ <includeGroupIds>at.gv.egiz</includeGroupIds>
+ <includeArtifactIds>BKULocal</includeArtifactIds>
+ <includeTypes>war</includeTypes>
+ <!--
+ <includes>**/*.class</includes>
+ <excludes>**/*.properties</excludes>
+ -->
+ <outputDirectory>${project.build.directory}/classes/BKULocalWar</outputDirectory>
+ <overWriteReleases>false</overWriteReleases>
+ <overWriteSnapshots>true</overWriteSnapshots>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.codehaus.mojo.webstart</groupId>
+ <artifactId>webstart-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>jnlp</goal> <!-- use jnlp, jnlp-inline or jnlp-single as appropriate -->
+ </goals>
+ <phase>package</phase>
+ </execution>
+ </executions>
+ <configuration>
+ <!--outputDirectory></outputDirectory--> <!-- not required?? -->
+
+ <!--
+ Set to true to exclude all transitive dependencies. Default is false.
+ -->
+ <excludeTransitive>false</excludeTransitive>
+
+ <!-- The path where the libraries are stored within the jnlp structure. not required. by default the libraries are within the working directory -->
+ <libPath>lib</libPath>
+
+ <!-- [optional] transitive dependencies filter - if omitted, all transitive dependencies are included -->
+ <dependencies>
+ <!-- Note that only groupId and artifactId must be specified here. because of a limitation of the Include/ExcludesArtifactFilter -->
+ <includes>
+ <include>commons-logging:commons-logging</include>
+ <include>log4j:log4j</include>
+ <include>at.gv.egiz:utils</include>
+ <include>javax.activation:activation</include>
+ <include>iaik:iaik_ecc</include>
+ <include>iaik:iaik_jce</include>
+ <include>iaik:iaik_xsect_unsigned</include>
+ <include>org.mortbay.jetty:jetty</include>
+ <include>org.mortbay.jetty:jetty-util</include>
+ <include>org.mortbay.jetty:servlet-api</include>
+ </includes>
+ <!-- excludes>
+ <exclude></exclude>
+ <excludes-->
+ </dependencies>
+
+ <!--resourcesDirectory>${project.basedir}/src/main/jnlp/resources</resourcesDirectory--> <!-- default value -->
+
+ <!-- JNLP generation -->
+ <jnlp>
+ <!-- default values -->
+ <!--inputTemplateResourcePath>${project.basedir}</inputTemplateResourcePath-->
+ <inputTemplate>src/main/jnlp/template.xml</inputTemplate> <!-- relative to inputTemplateResourcePath -->
+ <outputFile>mocca.jnlp</outputFile> <!-- defaults to launch.jnlp -->
+
+ <!-- used to automatically identify the jar containing the main class. -->
+ <!-- this is perhaps going to change -->
+ <mainClass>at.gv.egiz.bku.webstart.BKULauncher</mainClass>
+
+ <j2seVersion>1.6+</j2seVersion>
+ <!--offlineAllowed>true</offlineAllowed-->
+ <!--allPermissions>true</allPermissions-->
+ </jnlp>
+
+ <!-- SIGNING -->
+ <!-- defining this will automatically sign the jar and its dependencies, if necessary -->
+ <sign>
+ <alias>test-applet signer</alias>
+ <keystore>${project.basedir}/keystore.ks</keystore>
+ <storepass>storepass</storepass> <!-- ${storepass} -->
+ <keypass>keypass</keypass> <!-- we need to override passwords easily from the command line. ${keypass} -->
+ <!--storetype>fillme</storetype-->
+
+ <!--validity>fillme</validity-->
+
+ <!-- only required for generating the keystore -->
+ <!--dnameCn>fillme</dnameCn>
+ <dnameOu>fillme</dnameOu>
+ <dnameO>fillme</dnameO>
+ <dnameL>fillme</dnameL>
+ <dnameSt>fillme</dnameSt>
+ <dnameC>fillme</dnameC-->
+
+ <verify>true</verify> <!-- verify that the signing operation succeeded -->
+
+ <!-- KEYSTORE MANAGEMENT -->
+ <keystoreConfig>
+ <delete>false</delete> <!-- delete the keystore -->
+ <gen>false</gen> <!-- optional shortcut to generate the store. -->
+ </keystoreConfig>
+ </sign>
+
+ <!-- BUILDING PROCESS -->
+
+ <pack200>false</pack200>
+ <gzip>false</gzip> <!-- default force when pack200 false, true when pack200 selected ?? -->
+
+ <!-- causes a version attribute to be output in each jar resource element, optional, default is false -->
+ <outputJarVersions>true</outputJarVersions>
+
+ <!-- unsign IAIK-JCE (webstart error: JAR-Ressourcen in JNLP-Datei sind nicht von demselben Zertifikat signiert) -->
+ <unsignAlreadySignedJars>true</unsignAlreadySignedJars>
+
+ <!--install>false</install--> <!-- not yet supported -->
+ <verbose>true</verbose>
+
+ </configuration>
+ </plugin>
+
+
+
+
+
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>at.gv.egiz</groupId>
+ <artifactId>BKULocal</artifactId>
+ <version>1.0.5-SNAPSHOT</version>
+ <type>war</type>
+ </dependency>
+ <dependency>
+ <artifactId>utils</artifactId>
+ <groupId>at.gv.egiz</groupId>
+ <version>1.1.2-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <artifactId>iaik_jce</artifactId>
+ <groupId>iaik</groupId>
+ <version>3.16</version>
+ </dependency>
+ <dependency>
+ <artifactId>iaik_ecc</artifactId>
+ <groupId>iaik</groupId>
+ <version>2.15</version>
+ </dependency>
+ <dependency>
+ <artifactId>iaik_xsect_unsigned</artifactId>
+ <groupId>iaik</groupId>
+ <version>1.14</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.0.4</version>
+ </dependency>
+ <dependency>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty</artifactId>
+ <version>6.1.15</version>
+ </dependency>
+ </dependencies>
+
+
+
+
+
+
+</project> \ No newline at end of file
diff --git a/BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/BKULauncher.java b/BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/BKULauncher.java
new file mode 100644
index 00000000..854e6535
--- /dev/null
+++ b/BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/BKULauncher.java
@@ -0,0 +1,221 @@
+package at.gv.egiz.bku.webstart;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.security.KeyStore;
+import java.util.Enumeration;
+import java.util.Locale;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipFile;
+
+//import org.apache.commons.cli.CommandLine;
+//import org.apache.commons.cli.CommandLineParser;
+//import org.apache.commons.cli.HelpFormatter;
+//import org.apache.commons.cli.Options;
+//import org.apache.commons.cli.ParseException;
+//import org.apache.commons.cli.PosixParser;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import at.gv.egiz.bku.webstart.ui.BKUControllerInterface;
+import at.gv.egiz.bku.webstart.ui.TrayIconDialog;
+import at.gv.egiz.bku.utils.StreamUtil;
+
+public class BKULauncher implements BKUControllerInterface {
+
+ private static Log log = LogFactory.getLog(BKULauncher.class);
+
+ private ResourceBundle resourceBundle = null;
+ private Container server;
+// private SplashScreen splash = SplashScreen.getSplashScreen();
+
+ private void startUpServer() throws Exception {
+ server = new Container();
+ // XmlConfiguration xcfg = new XmlConfiguration(getClass().getClassLoader()
+ // .getResourceAsStream("at/gv/egiz/bku/local/app/jetty.xml"));
+ // xcfg.configure(server);
+ server.init();
+ server.start();
+ }
+
+ private void initTrayIcon() {
+ Locale loc = Locale.getDefault();
+ try {
+ resourceBundle = ResourceBundle.getBundle(
+ "at/gv/egiz/bku/webstart/ui/UIMessages", loc);
+ } catch (MissingResourceException mx) {
+ resourceBundle = ResourceBundle.getBundle(
+ "at/gv/egiz/bku/webstart/ui/UIMessages", Locale.ENGLISH);
+ }
+ TrayIconDialog.getInstance().init(resourceBundle);
+ TrayIconDialog.getInstance().setShutdownHook(this);
+ TrayIconDialog.getInstance().displayInfo("Greetings.Caption",
+ "Greetings.Message");
+ }
+
+ private void initStart() {
+
+ }
+
+ private void initFinished() {
+ try {
+// if (splash != null) {
+// try {
+// splash.close();
+// } catch (IllegalStateException ex) {
+// log.warn("Failed to close splash screen: " + ex.getMessage());
+// }
+// }
+ server.join();
+ } catch (InterruptedException e) {
+ log.info(e);
+ }
+ }
+
+// private void copyDirs(File srcDir, File dstDir) {
+// for (File cf : srcDir.listFiles()) {
+// File of = new File(dstDir, cf.getName());
+// if (cf.isDirectory()) {
+// log.debug("Creating directory: " + of);
+// of.mkdir();
+// copyDirs(cf, of);
+// } else {
+// log.debug("Writing file: " + of);
+// try {
+// FileInputStream fis = new FileInputStream(cf);
+// FileOutputStream fos = new FileOutputStream(of);
+// StreamUtil.copyStream(fis, fos);
+// fis.close();
+// fos.close();
+// } catch (IOException e) {
+// log.error("Cannot copy default configuration", e);
+// }
+// }
+// }
+// }
+
+ private void unzip(File zipfile) throws IOException {
+ File dir = zipfile.getParentFile();
+ ZipFile zipFile = new ZipFile(zipfile);
+ Enumeration<? extends ZipEntry> entries = zipFile.entries();
+ while (entries.hasMoreElements()) {
+ ZipEntry entry = entries.nextElement();
+ File eF = new File(dir, entry.getName());
+ if (entry.isDirectory()) {
+ eF.mkdirs();
+ continue;
+ }
+ File f = new File(eF.getParent());
+ f.mkdirs();
+ StreamUtil.copyStream(zipFile.getInputStream(entry),
+ new FileOutputStream(eF));
+ }
+ zipFile.close();
+ }
+
+ private void checkConfig(String[] args) {
+// CommandLineParser parser = new PosixParser();
+// Options options = new Options();
+// options.addOption("c", true, "the configuration's base directory");
+// options.addOption("h", false, "print this message");
+// try {
+ File cfgDir = new File(System.getProperty("user.home") + "/.mocca/conf");
+// CommandLine cmd = parser.parse(options, args);
+// if (cmd.hasOption("h")) {
+// HelpFormatter formatter = new HelpFormatter();
+// formatter.printHelp("BKULauncher", options);
+// System.exit(0);
+// }
+//
+// if (cmd.hasOption("c")) {
+// cfgDir = new File(cmd.getOptionValue("c"));
+// }
+ log.debug("using config directory: " + cfgDir);
+ if (cfgDir.exists() && cfgDir.isFile()) {
+ log.error("Configuration directory must not be a file");
+ }
+ if (!cfgDir.exists()) {
+ log.debug("Creating config directory: " + cfgDir);
+ cfgDir.mkdirs();
+ try {
+ InputStream is = getClass().getClassLoader().getResourceAsStream(
+ "at/gv/egiz/bku/webstart/defaultConf/template.zip");
+ OutputStream os = new FileOutputStream(new File(cfgDir,
+ "template.zip"));
+ StreamUtil.copyStream(is, os);
+ os.close();
+ unzip(new File(cfgDir, "template.zip"));
+ } catch (IOException iox) {
+ log.error("Cannot create user directory", iox);
+ return;
+ }
+ CA ca = new CA();
+ char[] password = "changeMe".toCharArray();
+ KeyStore ks = ca.generateKeyStore(password);
+ if (ks != null) {
+ File ksdir = new File(cfgDir, "keystore");
+ ksdir.mkdirs();
+ FileOutputStream fos;
+ try {
+ fos = new FileOutputStream(new File(ksdir, "keystore.ks"));
+ ks.store(fos, password);
+ fos.close();
+ } catch (Exception e) {
+ log.error("Cannot store keystore", e);
+ }
+ } else {
+ log.error("Cannot create ssl certificate");
+ }
+ }
+// } catch (ParseException e1) {
+// log.error(e1);
+// HelpFormatter formatter = new HelpFormatter();
+// formatter.printHelp("BKULauncher", options);
+// System.exit(0);
+// }
+ }
+
+ /**
+ * @param args
+ */
+ public static void main(String[] args) {
+ try {
+ log.warn("***** DISABLING SECURITY MANAGER *******");
+ System.setSecurityManager(null);
+ BKULauncher launcher = new BKULauncher();
+ launcher.initStart();
+ launcher.checkConfig(args);
+ launcher.startUpServer();
+ launcher.initTrayIcon();
+ launcher.initFinished();
+ } catch (Exception e) {
+ log.fatal("Cannot launch BKU", e);
+ System.exit(-1000);
+ }
+
+ }
+
+ public void shutDown() {
+ log.info("Shutting down server");
+ if ((server != null) && (server.isRunning())) {
+ try {
+ if (server.isRunning()) {
+ server.stop();
+ }
+ } catch (Exception e) {
+ log.debug(e.toString());
+ } finally {
+ if (server.isRunning()) {
+ server.destroy();
+ }
+ }
+ }
+ System.exit(0);
+ }
+
+}
diff --git a/BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/CA.java b/BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/CA.java
new file mode 100644
index 00000000..f81d3d83
--- /dev/null
+++ b/BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/CA.java
@@ -0,0 +1,117 @@
+package at.gv.egiz.bku.webstart;
+
+import iaik.asn1.ObjectID;
+import iaik.asn1.structures.AlgorithmID;
+import iaik.asn1.structures.Name;
+import iaik.x509.X509Certificate;
+import iaik.x509.extensions.BasicConstraints;
+import iaik.x509.extensions.KeyUsage;
+
+import java.math.BigInteger;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.security.GeneralSecurityException;
+import java.security.KeyPair;
+import java.security.KeyPairGenerator;
+import java.security.KeyStore;
+import java.security.NoSuchAlgorithmException;
+import java.util.Calendar;
+import java.util.GregorianCalendar;
+import java.util.Random;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+public class CA {
+ private final static Log log = LogFactory.getLog(CA.class);
+
+ private KeyPair caKeyPair;
+ private X509Certificate caCert;
+
+ private KeyPair serverKeyPair;
+ private X509Certificate serverCert;
+
+ public CA() {
+ }
+
+ private KeyPair generateKeyPair() throws NoSuchAlgorithmException {
+ KeyPairGenerator gen = KeyPairGenerator.getInstance("RSA");
+ gen.initialize(2048);
+ return gen.generateKeyPair();
+ }
+
+ private void generateCA() throws GeneralSecurityException {
+ log.debug("Generating CA certificate");
+ Name subject = new Name();
+ subject.addRDN(ObjectID.country, "AT");
+ subject.addRDN(ObjectID.organization, "MOCCA");
+ subject.addRDN(ObjectID.organizationalUnit, "MOCCA-CA");
+
+ caKeyPair = generateKeyPair();
+ caCert = new X509Certificate();
+ caCert.setSerialNumber(new BigInteger(20, new Random()));
+ caCert.setSubjectDN(subject);
+ caCert.setPublicKey(caKeyPair.getPublic());
+ caCert.setIssuerDN(subject);
+
+ caCert.addExtension(new BasicConstraints(true));
+ caCert.addExtension(new KeyUsage(KeyUsage.keyCertSign | KeyUsage.cRLSign
+ | KeyUsage.digitalSignature));
+
+ GregorianCalendar date = new GregorianCalendar();
+ date.add(Calendar.HOUR_OF_DAY, -1);
+ caCert.setValidNotBefore(date.getTime());
+ date.add(Calendar.YEAR, 7);
+ caCert.setValidNotAfter(date.getTime());
+ caCert.sign(AlgorithmID.sha1WithRSAEncryption, caKeyPair.getPrivate());
+ log.debug("Successfully signed CA certificate");
+ }
+
+ private void generateServerCert() throws GeneralSecurityException {
+ log.debug("Generating SSL certificate");
+ Name subject = new Name();
+ subject.addRDN(ObjectID.country, "AT");
+ subject.addRDN(ObjectID.organization, "MOCCA");
+ try {
+ subject.addRDN(ObjectID.commonName, InetAddress.getLocalHost()
+ .getHostName());
+ } catch (UnknownHostException e) {
+ subject.addRDN(ObjectID.commonName, "localhost");
+ }
+ serverKeyPair = generateKeyPair();
+ serverCert = new X509Certificate();
+ serverCert.setSerialNumber(new BigInteger(20, new Random()));
+ serverCert.setSubjectDN(subject);
+ serverCert.setPublicKey(serverKeyPair.getPublic());
+ serverCert.setIssuerDN(caCert.getSubjectDN());
+
+ serverCert.addExtension(new BasicConstraints(false));
+ serverCert.addExtension(new KeyUsage(KeyUsage.keyEncipherment
+ | KeyUsage.digitalSignature));
+
+ GregorianCalendar date = new GregorianCalendar();
+ date.add(Calendar.HOUR_OF_DAY, -1);
+ serverCert.setValidNotBefore(date.getTime());
+ date.add(Calendar.YEAR, 7);
+ date.add(Calendar.HOUR_OF_DAY, -1);
+ serverCert.setValidNotAfter(date.getTime());
+ serverCert.sign(AlgorithmID.sha1WithRSAEncryption, caKeyPair.getPrivate());
+ log.debug("Successfully signed server certificate");
+ caKeyPair = null;
+ }
+
+ public KeyStore generateKeyStore(char[] password) {
+ try {
+ generateCA();
+ generateServerCert();
+ KeyStore ks = KeyStore.getInstance("JKS");
+ ks.load(null, null);
+ ks.setKeyEntry("server", serverKeyPair.getPrivate(), password, new X509Certificate[]{serverCert, caCert});
+ return ks;
+ } catch (Exception e) {
+ log.error("Cannot generate certificate", e);
+ }
+ return null;
+ }
+
+}
diff --git a/BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/Container.java b/BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/Container.java
new file mode 100644
index 00000000..ef12e4fd
--- /dev/null
+++ b/BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/Container.java
@@ -0,0 +1,86 @@
+package at.gv.egiz.bku.webstart;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.mortbay.jetty.Connector;
+import org.mortbay.jetty.Handler;
+import org.mortbay.jetty.Server;
+import org.mortbay.jetty.handler.DefaultHandler;
+import org.mortbay.jetty.handler.HandlerCollection;
+import org.mortbay.jetty.nio.SelectChannelConnector;
+import org.mortbay.jetty.security.SslSocketConnector;
+import org.mortbay.jetty.webapp.WebAppContext;
+import org.mortbay.thread.QueuedThreadPool;
+
+public class Container {
+
+ public static final String HTTP_PORT = "mocca.http.port";
+ public static final String HTTPS_PORT = "mocca.http.port";
+
+ private static Log log = LogFactory.getLog(Container.class);
+
+ private Server server;
+
+ public Container() {
+ }
+
+ public void init() {
+ server = new Server();
+ QueuedThreadPool qtp = new QueuedThreadPool();
+ qtp.setMaxThreads(5);
+ qtp.setMinThreads(2);
+ qtp.setLowThreads(0);
+ server.setThreadPool(qtp);
+ server.setStopAtShutdown(true);
+ server.setGracefulShutdown(3000);
+
+ SelectChannelConnector connector = new SelectChannelConnector();
+ connector.setPort(Integer.getInteger(HTTP_PORT, 3495).intValue());
+ connector.setAcceptors(1);
+ connector.setConfidentialPort(Integer.getInteger(HTTPS_PORT, 3496).intValue());
+
+ SslSocketConnector sslConnector = new SslSocketConnector();
+ sslConnector.setPort(Integer.getInteger(HTTPS_PORT, 3496).intValue());
+ sslConnector.setAcceptors(1);
+ sslConnector.setKeystore(System.getProperty("user.home")
+ + "/.mocca/conf/keystore/keystore.ks");
+ sslConnector.setPassword("changeMe");
+ sslConnector.setKeyPassword("changeMe");
+
+ server.setConnectors(new Connector[] { connector, sslConnector });
+
+// HandlerCollection handlers = new HandlerCollection();
+ WebAppContext webapp = new WebAppContext();
+ webapp.setContextPath("/");
+ webapp.setExtractWAR(true); //false
+ webapp.setParentLoaderPriority(false);
+
+// webappcontext.setWar("BKULocal-1.0.4-SNAPSHOT.war");
+ webapp.setWar(getClass().getClassLoader().getResource("BKULocalWar/").toString());
+
+// handlers.setHandlers(new Handler[] { webappcontext, new DefaultHandler() });
+
+ server.setHandler(webapp);
+ server.setGracefulShutdown(1000*3);
+ }
+
+ public void start() throws Exception {
+ server.start();
+ }
+
+ public boolean isRunning() {
+ return server.isRunning();
+ }
+
+ public void stop() throws Exception {
+ server.stop();
+ }
+
+ public void destroy() {
+ server.destroy();
+ }
+
+ public void join() throws InterruptedException {
+ server.join();
+ }
+} \ No newline at end of file
diff --git a/utils/src/main/java/at/gv/egiz/bku/local/ui/BKUControllerInterface.java b/BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/ui/BKUControllerInterface.java
index 5e191c79..fd9838f9 100644
--- a/utils/src/main/java/at/gv/egiz/bku/local/ui/BKUControllerInterface.java
+++ b/BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/ui/BKUControllerInterface.java
@@ -14,10 +14,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package at.gv.egiz.bku.local.ui;
-
-public interface BKUControllerInterface {
-
- public void shutDown();
-
-}
+package at.gv.egiz.bku.webstart.ui;
+
+public interface BKUControllerInterface {
+
+ public void shutDown();
+
+}
diff --git a/utils/src/main/java/at/gv/egiz/bku/local/ui/TrayIconDialog.java b/BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/ui/TrayIconDialog.java
index fef113fd..4679eac5 100644
--- a/utils/src/main/java/at/gv/egiz/bku/local/ui/TrayIconDialog.java
+++ b/BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/ui/TrayIconDialog.java
@@ -14,189 +14,189 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package at.gv.egiz.bku.local.ui;
-
-import java.awt.AWTException;
-import java.awt.Image;
-import java.awt.MenuItem;
-import java.awt.PopupMenu;
-import java.awt.SystemTray;
-import java.awt.TrayIcon;
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.io.IOException;
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.Method;
-import java.lang.reflect.Proxy;
-import java.util.ResourceBundle;
-
-import javax.imageio.ImageIO;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-public class TrayIconDialog implements TrayIconDialogInterface {
-
- private static Log log = LogFactory.getLog(TrayIconDialog.class);
- private static TrayIconDialogInterface instance;
- private boolean isSupported;
- private BKUControllerInterface shutDown;
- private TrayIcon trayIcon = null;
- private ResourceBundle resourceBundle = null;
-
- private TrayIconDialog() {
- }
-
- private void displayTrayMsg(String captionID, String messageID,
- TrayIcon.MessageType type) {
- if ((isSupported) && (resourceBundle != null)) {
- try {
- trayIcon.displayMessage(resourceBundle.getString(captionID),
- resourceBundle.getString(messageID), type);
- } catch (Exception ex) {
- log.error(ex);
- }
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * at.gv.egiz.bku.local.ui.TrayIconDialogInterface#displayInfo(java.lang.String
- * , java.lang.String)
- */
- public void displayInfo(String captionID, String messageID) {
- displayTrayMsg(captionID, messageID, TrayIcon.MessageType.INFO);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * at.gv.egiz.bku.local.ui.TrayIconDialogInterface#displayWarning(java.lang
- * .String, java.lang.String)
- */
- public void displayWarning(String captionID, String messageID) {
- displayTrayMsg(captionID, messageID, TrayIcon.MessageType.WARNING);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * at.gv.egiz.bku.local.ui.TrayIconDialogInterface#displayError(java.lang.
- * String, java.lang.String)
- */
- public void displayError(String captionID, String messageID) {
- displayTrayMsg(captionID, messageID, TrayIcon.MessageType.ERROR);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * at.gv.egiz.bku.local.ui.TrayIconDialogInterface#init(java.util.ResourceBundle
- * )
- */
- public void init(ResourceBundle resourceBundel) {
- this.resourceBundle = resourceBundel;
- isSupported = SystemTray.isSupported();
- log.info("Trayicon supported: " + isSupported);
- try {
- if (isSupported) {
- SystemTray tray = SystemTray.getSystemTray();
- Image image = ImageIO.read(getClass().getClassLoader()
- .getResourceAsStream("at/gv/egiz/bku/local/ui/favicon.png"));
- PopupMenu popup = new PopupMenu();
- MenuItem exitItem = new MenuItem(resourceBundel
- .getString("TrayMenu.Shutdown"));
- popup.add(exitItem);
- exitItem.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent e) {
- log.info("Calling Shutdown");
- if (shutDown != null) {
- shutDown.shutDown();
- }
- }
- });
-
- trayIcon = new TrayIcon(image, "BKULogo", popup);
- trayIcon.setImageAutoSize(true);
- trayIcon.setToolTip(resourceBundel.getString("TrayMenu.Tooltip"));
- try {
- tray.add(trayIcon);
- } catch (AWTException e) {
- log.error("TrayIcon could not be added.", e);
- isSupported = false;
- }
- }
- } catch (IOException e) {
- log.error(e);
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * at.gv.egiz.bku.local.ui.TrayIconDialogInterface#setShutdownHook(at.gv.egiz
- * .bku.local.ui.BKUControllerInterface)
- */
- public void setShutdownHook(BKUControllerInterface shutDown) {
- this.shutDown = shutDown;
- }
-
- @SuppressWarnings("unchecked")
- public synchronized static TrayIconDialogInterface getInstance() {
- ClassLoader cl = TrayIconDialog.class.getClassLoader();
- if (instance == null) {
- if (cl.toString().equals(cl.getParent().toString())) {
- instance = new TrayIconDialog();
- return instance;
- }
- ClassLoader parent = cl;
- while (!parent.toString().equals(cl.getParent().toString())) {
- parent = parent.getParent();
- }
- try {
- Class<TrayIconDialog> otherClassInstance = (Class<TrayIconDialog>) parent
- .loadClass(TrayIconDialog.class.getName());
- Method getInstanceMethod = otherClassInstance.getDeclaredMethod(
- "getInstance", new Class[] {});
- Object otherSingleton = getInstanceMethod.invoke(null, new Object[] {});
- instance = (TrayIconDialogInterface) Proxy.newProxyInstance(cl,
- new Class[] { TrayIconDialogInterface.class },
- new PassThroughProxyHandler(otherSingleton));
- } catch (ClassNotFoundException ce) {
- instance = new TrayIconDialog();
- } catch (Exception e) {
- log.error(e);
- instance = new TrayIconDialog();
- }
- return instance;
- }
- return instance;
- }
-
- /**
- *
- * Only works for public methods
- *
- */
- static class PassThroughProxyHandler implements InvocationHandler {
- private final Object delegate;
-
- public PassThroughProxyHandler(Object delegate) {
- this.delegate = delegate;
- }
-
- public Object invoke(Object proxy, Method method, Object[] args)
- throws Throwable {
- Method delegateMethod = delegate.getClass().getMethod(method.getName(),
- method.getParameterTypes());
- return delegateMethod.invoke(delegate, args);
- }
- }
-
-}
+package at.gv.egiz.bku.webstart.ui;
+
+import java.awt.AWTException;
+import java.awt.Image;
+import java.awt.MenuItem;
+import java.awt.PopupMenu;
+import java.awt.SystemTray;
+import java.awt.TrayIcon;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.io.IOException;
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
+import java.util.ResourceBundle;
+
+import javax.imageio.ImageIO;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+public class TrayIconDialog implements TrayIconDialogInterface {
+
+ private static Log log = LogFactory.getLog(TrayIconDialog.class);
+ private static TrayIconDialogInterface instance;
+ private boolean isSupported;
+ private BKUControllerInterface shutDown;
+ private TrayIcon trayIcon = null;
+ private ResourceBundle resourceBundle = null;
+
+ private TrayIconDialog() {
+ }
+
+ private void displayTrayMsg(String captionID, String messageID,
+ TrayIcon.MessageType type) {
+ if ((isSupported) && (resourceBundle != null)) {
+ try {
+ trayIcon.displayMessage(resourceBundle.getString(captionID),
+ resourceBundle.getString(messageID), type);
+ } catch (Exception ex) {
+ log.error(ex);
+ }
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * at.gv.egiz.bku.local.ui.TrayIconDialogInterface#displayInfo(java.lang.String
+ * , java.lang.String)
+ */
+ public void displayInfo(String captionID, String messageID) {
+ displayTrayMsg(captionID, messageID, TrayIcon.MessageType.INFO);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * at.gv.egiz.bku.local.ui.TrayIconDialogInterface#displayWarning(java.lang
+ * .String, java.lang.String)
+ */
+ public void displayWarning(String captionID, String messageID) {
+ displayTrayMsg(captionID, messageID, TrayIcon.MessageType.WARNING);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * at.gv.egiz.bku.local.ui.TrayIconDialogInterface#displayError(java.lang.
+ * String, java.lang.String)
+ */
+ public void displayError(String captionID, String messageID) {
+ displayTrayMsg(captionID, messageID, TrayIcon.MessageType.ERROR);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * at.gv.egiz.bku.local.ui.TrayIconDialogInterface#init(java.util.ResourceBundle
+ * )
+ */
+ public void init(ResourceBundle resourceBundel) {
+ this.resourceBundle = resourceBundel;
+ isSupported = SystemTray.isSupported();
+ log.info("Trayicon supported: " + isSupported);
+ try {
+ if (isSupported) {
+ SystemTray tray = SystemTray.getSystemTray();
+ Image image = ImageIO.read(getClass().getClassLoader()
+ .getResourceAsStream("at/gv/egiz/bku/webstart/ui/logo.png"));
+ PopupMenu popup = new PopupMenu();
+ MenuItem exitItem = new MenuItem(resourceBundel
+ .getString("TrayMenu.Shutdown"));
+ popup.add(exitItem);
+ exitItem.addActionListener(new ActionListener() {
+ public void actionPerformed(ActionEvent e) {
+ log.info("Calling Shutdown");
+ if (shutDown != null) {
+ shutDown.shutDown();
+ }
+ }
+ });
+
+ trayIcon = new TrayIcon(image, "BKULogo", popup);
+ trayIcon.setImageAutoSize(true);
+ trayIcon.setToolTip(resourceBundel.getString("TrayMenu.Tooltip"));
+ try {
+ tray.add(trayIcon);
+ } catch (AWTException e) {
+ log.error("TrayIcon could not be added.", e);
+ isSupported = false;
+ }
+ }
+ } catch (IOException e) {
+ log.error(e);
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * at.gv.egiz.bku.local.ui.TrayIconDialogInterface#setShutdownHook(at.gv.egiz
+ * .bku.local.ui.BKUControllerInterface)
+ */
+ public void setShutdownHook(BKUControllerInterface shutDown) {
+ this.shutDown = shutDown;
+ }
+
+ @SuppressWarnings("unchecked")
+ public synchronized static TrayIconDialogInterface getInstance() {
+ ClassLoader cl = TrayIconDialog.class.getClassLoader();
+ if (instance == null) {
+ if (cl.toString().equals(cl.getParent().toString())) {
+ instance = new TrayIconDialog();
+ return instance;
+ }
+ ClassLoader parent = cl;
+ while (!parent.toString().equals(cl.getParent().toString())) {
+ parent = parent.getParent();
+ }
+ try {
+ Class<TrayIconDialog> otherClassInstance = (Class<TrayIconDialog>) parent
+ .loadClass(TrayIconDialog.class.getName());
+ Method getInstanceMethod = otherClassInstance.getDeclaredMethod(
+ "getInstance", new Class[] {});
+ Object otherSingleton = getInstanceMethod.invoke(null, new Object[] {});
+ instance = (TrayIconDialogInterface) Proxy.newProxyInstance(cl,
+ new Class[] { TrayIconDialogInterface.class },
+ new PassThroughProxyHandler(otherSingleton));
+ } catch (ClassNotFoundException ce) {
+ instance = new TrayIconDialog();
+ } catch (Exception e) {
+ log.error(e);
+ instance = new TrayIconDialog();
+ }
+ return instance;
+ }
+ return instance;
+ }
+
+ /**
+ *
+ * Only works for public methods
+ *
+ */
+ static class PassThroughProxyHandler implements InvocationHandler {
+ private final Object delegate;
+
+ public PassThroughProxyHandler(Object delegate) {
+ this.delegate = delegate;
+ }
+
+ public Object invoke(Object proxy, Method method, Object[] args)
+ throws Throwable {
+ Method delegateMethod = delegate.getClass().getMethod(method.getName(),
+ method.getParameterTypes());
+ return delegateMethod.invoke(delegate, args);
+ }
+ }
+
+}
diff --git a/utils/src/main/java/at/gv/egiz/bku/local/ui/TrayIconDialogInterface.java b/BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/ui/TrayIconDialogInterface.java
index 87c64102..078844cb 100644
--- a/utils/src/main/java/at/gv/egiz/bku/local/ui/TrayIconDialogInterface.java
+++ b/BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/ui/TrayIconDialogInterface.java
@@ -14,20 +14,20 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package at.gv.egiz.bku.local.ui;
-
-import java.util.ResourceBundle;
-
-public interface TrayIconDialogInterface {
-
- public abstract void displayInfo(String captionID, String messageID);
-
- public abstract void displayWarning(String captionID, String messageID);
-
- public abstract void displayError(String captionID, String messageID);
-
- public abstract void init(ResourceBundle resourceBundel);
-
- public abstract void setShutdownHook(BKUControllerInterface shutDown);
-
+package at.gv.egiz.bku.webstart.ui;
+
+import java.util.ResourceBundle;
+
+public interface TrayIconDialogInterface {
+
+ public abstract void displayInfo(String captionID, String messageID);
+
+ public abstract void displayWarning(String captionID, String messageID);
+
+ public abstract void displayError(String captionID, String messageID);
+
+ public abstract void init(ResourceBundle resourceBundel);
+
+ public abstract void setShutdownHook(BKUControllerInterface shutDown);
+
} \ No newline at end of file
diff --git a/BKUWebStart/src/main/jnlp/resources/logo.png b/BKUWebStart/src/main/jnlp/resources/logo.png
new file mode 100644
index 00000000..2c622d88
--- /dev/null
+++ b/BKUWebStart/src/main/jnlp/resources/logo.png
Binary files differ
diff --git a/BKUWebStart/src/main/jnlp/resources/logo_64x64.png b/BKUWebStart/src/main/jnlp/resources/logo_64x64.png
new file mode 100644
index 00000000..fa6d7f96
--- /dev/null
+++ b/BKUWebStart/src/main/jnlp/resources/logo_64x64.png
Binary files differ
diff --git a/BKUWebStart/src/main/jnlp/resources/logo_90x90.png b/BKUWebStart/src/main/jnlp/resources/logo_90x90.png
new file mode 100644
index 00000000..d7f8bbd0
--- /dev/null
+++ b/BKUWebStart/src/main/jnlp/resources/logo_90x90.png
Binary files differ
diff --git a/BKUWebStart/src/main/jnlp/resources/splash.png b/BKUWebStart/src/main/jnlp/resources/splash.png
new file mode 100644
index 00000000..72c1d868
--- /dev/null
+++ b/BKUWebStart/src/main/jnlp/resources/splash.png
Binary files differ
diff --git a/BKUWebStart/src/main/jnlp/template.xml b/BKUWebStart/src/main/jnlp/template.xml
new file mode 100644
index 00000000..0a89a036
--- /dev/null
+++ b/BKUWebStart/src/main/jnlp/template.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<jnlp spec="$jnlpspec" codebase="$project.Url" href="$outputFile">
+ <information>
+ <title>$project.Name</title>
+ <vendor>$project.Organization.Name</vendor>
+ <homepage href="$project.Url"/>
+ <description>$project.Description</description>
+ <icon href="lib/splash.png" kind="splash"/>
+ <icon href="lib/logo.png" kind="default"/>
+ <shortcut online="false">
+ <desktop/>
+ <menu submenu="MOCCA"/>
+ </shortcut>
+
+#if($offlineAllowed)
+ <offline-allowed/>
+#end
+
+ </information>
+
+
+#if($allPermissions)
+ <security>
+ <all-permissions/>
+ </security>
+#end
+
+ <resources>
+ <!-- initial-heap-size="32m" max-heap-size="128m" -->
+ <j2se version="$j2seVersion"/>
+ <property name="jnlp.versionEnabled" value="true"/>
+
+ $dependencies
+
+ </resources>
+ <application-desc main-class="$mainClass"/>
+</jnlp> \ No newline at end of file
diff --git a/BKUWebStart/src/main/resources/at/gv/egiz/bku/webstart/defaultConf/template.zip b/BKUWebStart/src/main/resources/at/gv/egiz/bku/webstart/defaultConf/template.zip
new file mode 100644
index 00000000..f14b0c19
--- /dev/null
+++ b/BKUWebStart/src/main/resources/at/gv/egiz/bku/webstart/defaultConf/template.zip
Binary files differ
diff --git a/BKUWebStart/src/main/resources/at/gv/egiz/bku/webstart/ui/UIMessages.properties b/BKUWebStart/src/main/resources/at/gv/egiz/bku/webstart/ui/UIMessages.properties
new file mode 100644
index 00000000..873d03ef
--- /dev/null
+++ b/BKUWebStart/src/main/resources/at/gv/egiz/bku/webstart/ui/UIMessages.properties
@@ -0,0 +1,13 @@
+#-------- tray icon messages -------
+TrayMenu.Tooltip=MOCCA
+TrayMenu.Shutdown=MOCCA Beenden
+
+Greetings.Message=MOCCA up and running
+Greetings.Caption=MOCCA Started
+
+Message.RequestCaption=New Request
+Message.InfoboxReadRequest=Reading Infobox
+Message.SecureSignatureKeypair=Reading secure signature certificate
+Message.CertifiedKeypair=Reading certified certificate
+Message.IdentityLink=Reading Identitylink
+Message.SignRequest=Creating Signature \ No newline at end of file
diff --git a/BKUWebStart/src/main/resources/at/gv/egiz/bku/webstart/ui/favicon.png b/BKUWebStart/src/main/resources/at/gv/egiz/bku/webstart/ui/favicon.png
new file mode 100644
index 00000000..2d0276de
--- /dev/null
+++ b/BKUWebStart/src/main/resources/at/gv/egiz/bku/webstart/ui/favicon.png
Binary files differ
diff --git a/BKUWebStart/src/main/resources/at/gv/egiz/bku/webstart/ui/logo.png b/BKUWebStart/src/main/resources/at/gv/egiz/bku/webstart/ui/logo.png
new file mode 100644
index 00000000..598ab00b
--- /dev/null
+++ b/BKUWebStart/src/main/resources/at/gv/egiz/bku/webstart/ui/logo.png
Binary files differ
diff --git a/BKUWebStart/src/main/resources/log4j.properties b/BKUWebStart/src/main/resources/log4j.properties
new file mode 100644
index 00000000..4df33ab5
--- /dev/null
+++ b/BKUWebStart/src/main/resources/log4j.properties
@@ -0,0 +1,16 @@
+# loglever DEBUG, appender STDOUT
+log4j.rootLogger=TRACE, STDOUT, file
+
+# STDOUT appender
+log4j.appender.STDOUT=org.apache.log4j.ConsoleAppender
+log4j.appender.STDOUT.layout=org.apache.log4j.PatternLayout
+#log4j.appender.STDOUT.layout.ConversionPattern=%5p | %d{dd HH:mm:ss,SSS} | %20c | %10t | %m%n
+#log4j.appender.STDOUT.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
+log4j.appender.STDOUT.layout.ConversionPattern=%-5p |%d | %t | %c %x- %m%n
+
+### FILE appender
+log4j.appender.file=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.file.datePattern='.'yyyy-MM-dd
+log4j.appender.file.File=${user.home}/.mocca/logs/webstart.log
+log4j.appender.file.layout=org.apache.log4j.PatternLayout
+log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n \ No newline at end of file
diff --git a/BKUWebStart/src/main/resources/logo.png b/BKUWebStart/src/main/resources/logo.png
new file mode 100644
index 00000000..fa6d7f96
--- /dev/null
+++ b/BKUWebStart/src/main/resources/logo.png
Binary files differ
diff --git a/BKUWebStart/src/main/resources/logo_32x32.png b/BKUWebStart/src/main/resources/logo_32x32.png
new file mode 100644
index 00000000..337b144b
--- /dev/null
+++ b/BKUWebStart/src/main/resources/logo_32x32.png
Binary files differ
diff --git a/BKUWebStart/src/main/resources/logo_90x90.png b/BKUWebStart/src/main/resources/logo_90x90.png
new file mode 100644
index 00000000..d7f8bbd0
--- /dev/null
+++ b/BKUWebStart/src/main/resources/logo_90x90.png
Binary files differ
diff --git a/BKUWebStart/src/main/resources/logo_RGB22x22.png b/BKUWebStart/src/main/resources/logo_RGB22x22.png
new file mode 100644
index 00000000..598ab00b
--- /dev/null
+++ b/BKUWebStart/src/main/resources/logo_RGB22x22.png
Binary files differ
diff --git a/BKUWebStart/src/main/resources/logo_RGB32x32.png b/BKUWebStart/src/main/resources/logo_RGB32x32.png
new file mode 100644
index 00000000..2c622d88
--- /dev/null
+++ b/BKUWebStart/src/main/resources/logo_RGB32x32.png
Binary files differ
diff --git a/BKUWebStart/src/main/resources/splash.png b/BKUWebStart/src/main/resources/splash.png
new file mode 100644
index 00000000..72c1d868
--- /dev/null
+++ b/BKUWebStart/src/main/resources/splash.png
Binary files differ
diff --git a/BKUWebStart/src/main/webapp/WEB-INF/web.xml b/BKUWebStart/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 00000000..9f88c1f9
--- /dev/null
+++ b/BKUWebStart/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,7 @@
+<!DOCTYPE web-app PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd" >
+
+<web-app>
+ <display-name>Archetype Created Web Application</display-name>
+</web-app>
diff --git a/BKUWebStart/src/main/webapp/launch.html b/BKUWebStart/src/main/webapp/launch.html
new file mode 100644
index 00000000..6ed6feb5
--- /dev/null
+++ b/BKUWebStart/src/main/webapp/launch.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+ <head>
+ <title>Test page for launching the application via JNLP</title>
+ </head>
+ <body>
+ <h3>Test page for launching the application via JNLP</h3>
+ <a href="launch.jnlp">Launch the application</a>
+ <!-- Or use the following script element to launch with the Deployment Toolkit -->
+ <!-- Open the deployJava.js script to view its documentation -->
+ <script src="http://java.com/js/deployJava.js"></script>
+ <script>
+ var url="http://localhost:8080/BKUWebStart/launch.jnlp"
+ deployJava.createWebStartLaunchButton(url, "1.6")
+ </script>
+ </body>
+</html>
diff --git a/BKUWebStart/src/main/webapp/launch.jnlp b/BKUWebStart/src/main/webapp/launch.jnlp
new file mode 100644
index 00000000..d51d9d21
--- /dev/null
+++ b/BKUWebStart/src/main/webapp/launch.jnlp
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<jnlp codebase="http://localhost:8080/BKUWebStart/" href="launch.jnlp" spec="1.0+">
+ <information>
+ <title>BKU Web Start</title>
+ <vendor>EGIZ</vendor>
+ <homepage href="http://mocca.egovlabs.gv.at"/>
+ <description>BKU WebStart (aka. Lokale BKU)</description>
+ <description kind="short">BKU WebStart</description>
+ <icon href="splash.png" kind="splash"/>
+ <icon href="mocca_tiny.png" kind="default"/>
+ <offline-allowed/>
+ </information>
+ <security>
+ <all-permissions/>
+ </security>
+ <resources>
+ <j2se version="1.6+"/>
+ <jar eager="true" href="BKUWebStart.jar" main="true"/>
+ <jar href="lib/appframework-1.0.3.jar"/>
+ <jar href="lib/swing-worker-1.1.jar"/>
+ <jar href="lib/commons-logging-1.1.1.jar"/>
+ <jar href="lib/jetty-util-6.1.15.jar"/>
+ <jar href="lib/commons-cli-1.0.jar"/>
+ <jar href="lib/servlet-api-2.5-20081211.jar"/>
+ <jar href="lib/jetty-6.1.15.jar"/>
+ <jar href="lib/log4j-1.2.12.jar"/>
+ </resources>
+ <application-desc main-class="at.gv.egiz.bku.webstart.BKULauncher">
+ </application-desc>
+</jnlp>
diff --git a/BKUWebStart/src/main/webapp/mocca_tiny.png b/BKUWebStart/src/main/webapp/mocca_tiny.png
new file mode 100644
index 00000000..1f125d9b
--- /dev/null
+++ b/BKUWebStart/src/main/webapp/mocca_tiny.png
Binary files differ
diff --git a/BKUWebStart/src/main/webapp/splash.png b/BKUWebStart/src/main/webapp/splash.png
new file mode 100644
index 00000000..72c1d868
--- /dev/null
+++ b/BKUWebStart/src/main/webapp/splash.png
Binary files differ
diff --git a/pom.xml b/pom.xml
index 10765f01..ec3465b9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>at.gv.egiz</groupId>
@@ -22,7 +23,9 @@
<module>STALExt</module>
<module>STALXService</module>
<module>BKUAppletExt</module>
- </modules>
+ <module>BKUWebStart</module>
+
+ </modules>
<developers>
<developer>
<id>mcentner</id>
@@ -239,4 +242,4 @@
</dependency>
</dependencies>
</dependencyManagement>
-</project> \ No newline at end of file
+</project>