summaryrefslogtreecommitdiff
path: root/BKULocal/src
diff options
context:
space:
mode:
authormcentner <mcentner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2010-07-28 09:05:04 +0000
committermcentner <mcentner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2010-07-28 09:05:04 +0000
commitaf24a20257f4958ef5335d471a7fe2c93f475a35 (patch)
treef7f4b2da3f123433d78a1c950d1150b9adf60356 /BKULocal/src
parentc84ee7bc9459bf4966144d29efc4e91b6497a28e (diff)
downloadmocca-af24a20257f4958ef5335d471a7fe2c93f475a35.tar.gz
mocca-af24a20257f4958ef5335d471a7fe2c93f475a35.tar.bz2
mocca-af24a20257f4958ef5335d471a7fe2c93f475a35.zip
Resolved issue [#MOCCA-745] (Two simultaneous requests within the same session cause failure in both requests).
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@790 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'BKULocal/src')
-rw-r--r--BKULocal/src/main/java/at/gv/egiz/bku/local/gui/LocalHelpListener.java5
-rw-r--r--BKULocal/src/main/java/at/gv/egiz/bku/local/stal/LocalSTALFactory.java9
-rw-r--r--BKULocal/src/main/java/at/gv/egiz/bku/local/webapp/PINManagementServlet.java7
3 files changed, 15 insertions, 6 deletions
diff --git a/BKULocal/src/main/java/at/gv/egiz/bku/local/gui/LocalHelpListener.java b/BKULocal/src/main/java/at/gv/egiz/bku/local/gui/LocalHelpListener.java
index ced47d6c..8730a611 100644
--- a/BKULocal/src/main/java/at/gv/egiz/bku/local/gui/LocalHelpListener.java
+++ b/BKULocal/src/main/java/at/gv/egiz/bku/local/gui/LocalHelpListener.java
@@ -21,6 +21,7 @@ import java.awt.Desktop;
import java.awt.event.KeyEvent;
import java.awt.event.MouseEvent;
import java.net.URI;
+import java.net.URL;
import java.util.Locale;
import org.slf4j.Logger;
@@ -37,8 +38,8 @@ public class LocalHelpListener extends ViewerHelpListener {
protected Desktop desktop;
- public LocalHelpListener(String helpURL, Locale locale) {
- super(helpURL, locale);
+ public LocalHelpListener(URL baseURL, Locale locale) {
+ super(baseURL, locale);
if (Desktop.isDesktopSupported() && Desktop.getDesktop().isSupported(Desktop.Action.BROWSE)) {
desktop = Desktop.getDesktop();
} else {
diff --git a/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/LocalSTALFactory.java b/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/LocalSTALFactory.java
index 2c986d84..cc0d8fc2 100644
--- a/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/LocalSTALFactory.java
+++ b/BKULocal/src/main/java/at/gv/egiz/bku/local/stal/LocalSTALFactory.java
@@ -19,6 +19,8 @@ package at.gv.egiz.bku.local.stal;
import at.gv.egiz.bku.viewer.ResourceFontLoader;
import java.awt.Dimension;
import java.awt.Toolkit;
+import java.net.MalformedURLException;
+import java.net.URL;
import java.util.Locale;
@@ -46,7 +48,7 @@ public class LocalSTALFactory implements STALFactory {
private final Logger log = LoggerFactory.getLogger(LocalSTALFactory.class);
protected static final Dimension PREFERRED_SIZE = new Dimension(318, 200);
- protected String helpURL;
+ protected URL helpURL;
protected Locale locale;
protected Configuration configuration;
@@ -108,9 +110,10 @@ public class LocalSTALFactory implements STALFactory {
/**
* spring injects helpURL
* @param helpURL
+ * @throws MalformedURLException if helpURL is not a valid URL
*/
- public void setHelpURL(String helpURL) {
- this.helpURL = helpURL;
+ public void setHelpURL(String helpURL) throws MalformedURLException {
+ this.helpURL = new URL(helpURL);
}
/**
diff --git a/BKULocal/src/main/java/at/gv/egiz/bku/local/webapp/PINManagementServlet.java b/BKULocal/src/main/java/at/gv/egiz/bku/local/webapp/PINManagementServlet.java
index ab41634e..1d079786 100644
--- a/BKULocal/src/main/java/at/gv/egiz/bku/local/webapp/PINManagementServlet.java
+++ b/BKULocal/src/main/java/at/gv/egiz/bku/local/webapp/PINManagementServlet.java
@@ -22,6 +22,7 @@ import at.gv.egiz.stal.STAL;
import at.gv.egiz.stal.STALResponse;
import at.gv.egiz.stal.ext.PINManagementRequest;
import java.io.IOException;
+import java.net.MalformedURLException;
import java.net.URL;
import java.util.Collections;
import java.util.List;
@@ -46,7 +47,11 @@ public class PINManagementServlet extends HttpServlet {
public PINManagementServlet() {
stalFactory = new LocalSTALFactory();
- stalFactory.setHelpURL("http://localhost:3495/help/");
+ try {
+ stalFactory.setHelpURL("http://localhost:3495/help/");
+ } catch (MalformedURLException e) {
+ log.info("Failed to set help URL.", e);
+ }
}
/**