summaryrefslogtreecommitdiff
path: root/BKUApplet/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'BKUApplet/src/main/java')
-rw-r--r--BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/AppletBKUWorker.java2
-rw-r--r--BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java25
2 files changed, 8 insertions, 19 deletions
diff --git a/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/AppletBKUWorker.java b/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/AppletBKUWorker.java
index 6fa9d45f..ee1deae8 100644
--- a/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/AppletBKUWorker.java
+++ b/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/AppletBKUWorker.java
@@ -183,7 +183,7 @@ public class AppletBKUWorker extends AbstractBKUWorker implements Runnable {
}
}
- applet.sendRedirect(sessionId);
+ applet.sendRedirect();
}
/**
diff --git a/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java b/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java
index 9344181a..b7b72b5d 100644
--- a/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java
+++ b/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/BKUApplet.java
@@ -181,7 +181,7 @@ public class BKUApplet extends JApplet {
URL backgroundImgURL = null;
try {
- backgroundImgURL = getURLParameter(BACKGROUND_IMG, null);
+ backgroundImgURL = getURLParameter(BACKGROUND_IMG);
log.debug("Setting background: {}.", backgroundImgURL);
} catch (MalformedURLException ex) {
log.warn("Cannot load applet background image. {}", ex.getMessage());
@@ -287,7 +287,7 @@ public class BKUApplet extends JApplet {
* @throws java.net.MalformedURLException
*/
public STALPortType getSTALPort() throws MalformedURLException {
- URL wsdlURL = getURLParameter(WSDL_URL, null);
+ URL wsdlURL = getURLParameter(WSDL_URL);
log.debug("Setting STAL WSDL: {}.", wsdlURL);
QName endpointName = new QName(STAL_WSDL_NS, STAL_SERVICE);
STALService stal = new STALService(wsdlURL, endpointName);
@@ -311,14 +311,14 @@ public class BKUApplet extends JApplet {
* @return
* @throws java.net.MalformedURLException
*/
- protected void sendRedirect(String sessionId) {
+ protected void sendRedirect() {
try {
AppletContext ctx = getAppletContext();
if (ctx == null) {
log.error("No applet context (applet might already have been destroyed).");
return;
}
- URL redirectURL = getURLParameter(REDIRECT_URL, sessionId);
+ URL redirectURL = getURLParameter(REDIRECT_URL);
String redirectTarget = getParameter(REDIRECT_TARGET);
if (redirectTarget == null) {
log.info("Done. Redirecting to {}.", redirectURL);
@@ -342,23 +342,12 @@ public class BKUApplet extends JApplet {
// ///////////////////////////////////////////////////////////////////////////
// utility methods
// ///////////////////////////////////////////////////////////////////////////
- protected URL getURLParameter(String paramKey, String sessionId)
+ protected URL getURLParameter(String paramKey)
throws MalformedURLException {
String urlParam = getParameter(paramKey);
- if (urlParam != null && !"".equals(urlParam)) {
- URL codebase = getCodeBase();
+ if (urlParam != null && !urlParam.isEmpty()) {
try {
- URL url;
- if (codebase.getProtocol().equalsIgnoreCase("file")) {
- // for debugging in appletrunner
- url = new URL(urlParam);
- } else {
- if (sessionId != null) {
- urlParam = urlParam + ";jsessionid=" + sessionId;
- }
- url = new URL(codebase, urlParam);
- }
- return url;
+ return new URL(getCodeBase(), urlParam);
} catch (MalformedURLException ex) {
log.error("Applet paremeter {} ist not a valid URL. {}", urlParam, ex.getMessage());
throw ex;