diff --git a/distribution/docker-conf/app.properties b/distribution/docker-conf/app.properties
index 9620b810..b08f02b8 100644
--- a/distribution/docker-conf/app.properties
+++ b/distribution/docker-conf/app.properties
@@ -101,8 +101,7 @@ admin.user = admin@wisemapping.org
# Base URL where WiseMapping is deployed. By default, It will be automatically inferred.
# If you are planning to put wisemapping behind an Apache using an Apache Proxy setup, you must enable this property.
-#site.baseurl = http://example.com:8080/wisemapping
-
+site.static.js.url = /static
# Site Homepage URL. This will be used as URL for homepage location.
site.homepage = c/home
diff --git a/wise-webapp/src/main/java/com/wisemapping/exceptions/ImportUnexpectedException.java b/wise-webapp/src/main/java/com/wisemapping/exceptions/ImportUnexpectedException.java
deleted file mode 100755
index b5e70d29..00000000
--- a/wise-webapp/src/main/java/com/wisemapping/exceptions/ImportUnexpectedException.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
-* Copyright [2015] [wisemapping]
-*
-* Licensed under WiseMapping Public License, Version 1.0 (the "License").
-* It is basically the Apache License, Version 2.0 (the "License") plus the
-* "powered by wisemapping" text requirement on every single page;
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the license at
-*
-* http://www.wisemapping.org/license
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-
-package com.wisemapping.exceptions;
-
-import org.jetbrains.annotations.NotNull;
-
-public class ImportUnexpectedException
- extends WiseMappingException {
- private byte[] freemindXml;
-
-
- public ImportUnexpectedException(@NotNull Throwable e, @NotNull byte[] map) {
- super("Unexpected expected error importing freemind. Please, try latter.", e);
- this.freemindXml = map;
- }
-
- public ImportUnexpectedException(String str, Exception e) {
- super(str);
- initCause(e);
- }
-
- public byte[] getFreemindXml() {
- return freemindXml;
- }
-}
diff --git a/wise-webapp/src/main/java/com/wisemapping/filter/RequestPropertiesInterceptor.java b/wise-webapp/src/main/java/com/wisemapping/filter/RequestPropertiesInterceptor.java
index d0a262cb..0c28736c 100644
--- a/wise-webapp/src/main/java/com/wisemapping/filter/RequestPropertiesInterceptor.java
+++ b/wise-webapp/src/main/java/com/wisemapping/filter/RequestPropertiesInterceptor.java
@@ -20,13 +20,13 @@ package com.wisemapping.filter;
import org.jetbrains.annotations.NotNull;
import org.springframework.beans.factory.annotation.Value;
-import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
+import org.springframework.web.servlet.HandlerInterceptor;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-public class RequestPropertiesInterceptor extends HandlerInterceptorAdapter {
+public class RequestPropertiesInterceptor implements HandlerInterceptor {
@Value("${google.analytics.enabled}")
private Boolean analyticsEnabled;
@@ -54,6 +54,7 @@ public class RequestPropertiesInterceptor extends HandlerInterceptorAdapter {
@Value("${security.type}")
private String securityType;
+ @Override
public boolean preHandle(@NotNull HttpServletRequest request, @NotNull HttpServletResponse response, Object object) throws Exception {
request.setAttribute("google.analytics.enabled", analyticsEnabled);
diff --git a/wise-webapp/src/main/java/com/wisemapping/filter/SupportedUserAgent.java b/wise-webapp/src/main/java/com/wisemapping/filter/SupportedUserAgent.java
index 629c92ed..9a7bc216 100644
--- a/wise-webapp/src/main/java/com/wisemapping/filter/SupportedUserAgent.java
+++ b/wise-webapp/src/main/java/com/wisemapping/filter/SupportedUserAgent.java
@@ -18,72 +18,6 @@
package com.wisemapping.filter;
-import com.wisemapping.util.Browser;
-import com.wisemapping.util.UserAgent;
-import com.wisemapping.util.Version;
-import org.jetbrains.annotations.NotNull;
-
-import javax.servlet.http.HttpServletRequest;
-import java.io.Serializable;
-
-public class SupportedUserAgent implements Serializable {
- public static final String USER_AGENT_HEADER = "User-Agent";
- transient private UserAgent userAgent;
- private final String header;
-
- private SupportedUserAgent(@NotNull final String header) {
- this.header = header;
- }
-
- public static SupportedUserAgent create(@NotNull final HttpServletRequest request) {
- return new SupportedUserAgent(request.getHeader(USER_AGENT_HEADER));
- }
-
- public boolean isBrowserSupported() {
-
-// final UserAgent userAgent = this.getUserAgent();
-// final Browser browser = userAgent.getBrowser();
-// final OperatingSystem os = userAgent.getOperatingSystem();
-// final Version version = userAgent.getBrowserVersion();
-// final int majorVersion = version != null ? Integer.parseInt(version.getMajorVersion()) : -1;
-//
-// boolean result = browser == Browser.FIREFOX && majorVersion >= 10;
-// result = result || browser == Browser.FIREFOX2 && majorVersion >= 17;
-// result = result || browser == Browser.FIREFOX3 && majorVersion >= 29;
-// result = result || browser == Browser.FIREFOX4 && majorVersion >= 40;
-// result = result || browser == Browser.IE8 || browser == Browser.IE9 || browser == Browser.IE11 ;
-// result = result || browser == Browser.IE && majorVersion >= 8;
-// result = result || browser == Browser.OPERA10 && majorVersion >= 11;
-// result = result || browser == Browser.CHROME && majorVersion >= 18;
-// result = result || browser == Browser.SAFARI5;
-// result = result || browser == Browser.SAFARI && majorVersion >= 5;
-// result = result || browser == Browser.MOBILE_SAFARI;
-// result = result || os.isMobileDevice() && (os == OperatingSystem.ANDROID || os == OperatingSystem.iOS4_IPHONE);
-// result = result || browser.getBrowserType() == BrowserType.ROBOT;
-
- return true;
- }
-
- @NotNull
- synchronized
- private UserAgent getUserAgent() {
- if (userAgent == null) {
- userAgent = new UserAgent(header);
- }
- return userAgent;
- }
-
- public boolean needsGCF() {
- final UserAgent userAgent = this.getUserAgent();
- final Browser browser = userAgent.getBrowser();
- final Version version = userAgent.getBrowserVersion();
-
- return (browser == Browser.IE8 || browser == Browser.IE && Integer.parseInt(version.getMajorVersion()) == 8) && !header.contains("chromeframe");
- }
-
- public static SupportedUserAgent create(@NotNull final String userAgent) {
- return new SupportedUserAgent(userAgent);
- }
-
-
+public interface SupportedUserAgent{
+ String USER_AGENT_HEADER = "User-Agent";
}
diff --git a/wise-webapp/src/main/java/com/wisemapping/filter/UserLocaleInterceptor.java b/wise-webapp/src/main/java/com/wisemapping/filter/UserLocaleInterceptor.java
index 57c903b7..88cef60c 100644
--- a/wise-webapp/src/main/java/com/wisemapping/filter/UserLocaleInterceptor.java
+++ b/wise-webapp/src/main/java/com/wisemapping/filter/UserLocaleInterceptor.java
@@ -21,6 +21,7 @@ package com.wisemapping.filter;
import com.wisemapping.model.User;
import com.wisemapping.security.Utils;
import org.jetbrains.annotations.NotNull;
+import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
import org.springframework.web.servlet.i18n.SessionLocaleResolver;
@@ -29,8 +30,9 @@ import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.util.Locale;
-public class UserLocaleInterceptor extends HandlerInterceptorAdapter {
+public class UserLocaleInterceptor implements HandlerInterceptor {
+ @Override
public boolean preHandle(@NotNull HttpServletRequest request, @NotNull HttpServletResponse response, Object object) throws Exception {
final HttpSession session = request.getSession(false);
diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/BaseController.java b/wise-webapp/src/main/java/com/wisemapping/rest/BaseController.java
index bec0f7e3..e2505527 100644
--- a/wise-webapp/src/main/java/com/wisemapping/rest/BaseController.java
+++ b/wise-webapp/src/main/java/com/wisemapping/rest/BaseController.java
@@ -19,7 +19,6 @@
package com.wisemapping.rest;
import com.wisemapping.exceptions.ClientException;
-import com.wisemapping.exceptions.ImportUnexpectedException;
import com.wisemapping.exceptions.Severity;
import com.wisemapping.mail.NotificationService;
import com.wisemapping.model.User;
@@ -64,15 +63,6 @@ public class BaseController {
return new RestErrors(ex.getMessage(), Severity.WARNING);
}
- @ExceptionHandler(ImportUnexpectedException.class)
- @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
- @ResponseBody
- public RestErrors handleImportErrors(@NotNull ImportUnexpectedException ex, @NotNull HttpServletRequest request) {
- final User user = Utils.getUser();
- notificationService.reportJavaException(ex, user, new String(ex.getFreemindXml()), request);
- return new RestErrors(ex.getMessage(), Severity.SEVERE);
- }
-
@ExceptionHandler(ValidationException.class)
@ResponseStatus(HttpStatus.BAD_REQUEST)
public RestErrors handleValidationErrors(@NotNull ValidationException ex) {
diff --git a/wise-webapp/src/main/java/com/wisemapping/webmvc/MindmapController.java b/wise-webapp/src/main/java/com/wisemapping/webmvc/MindmapController.java
index b1d33939..88b60517 100644
--- a/wise-webapp/src/main/java/com/wisemapping/webmvc/MindmapController.java
+++ b/wise-webapp/src/main/java/com/wisemapping/webmvc/MindmapController.java
@@ -60,19 +60,6 @@ public class MindmapController {
return "mindmapPrint";
}
- @RequestMapping(value = "maps/{id}/share")
- public String showSharePage(@PathVariable int id, @NotNull Model model) throws MapCouldNotFoundException {
- final Mindmap mindmap = findMindmap(id);
- model.addAttribute("mindmap", mindmap);
- return "mindmapShare";
- }
-
- @RequestMapping(value = "maps/{id}/sharef")
- public String showSharePageFull(@PathVariable int id, @NotNull Model model) throws MapCouldNotFoundException {
- showSharePage(id, model);
- return "mindmapShareFull";
- }
-
@RequestMapping(value = "maps/")
public String showListPage(@NotNull Model model) {
return "mindmapList";
diff --git a/wise-webapp/src/main/webapp/WEB-INF/app.properties b/wise-webapp/src/main/webapp/WEB-INF/app.properties
index 7fcf243f..9ce5f186 100755
--- a/wise-webapp/src/main/webapp/WEB-INF/app.properties
+++ b/wise-webapp/src/main/webapp/WEB-INF/app.properties
@@ -99,7 +99,7 @@ admin.user = admin@wisemapping.org
site.homepage = c/home
# Font end static content can be deployed externally to the web app. Uncomment here and specify the url base location.
-# site.static.js.url = http://www.example.com/
+site.static.js.url = /static
##################################################################################
# Google Analytics Settings
diff --git a/wise-webapp/src/main/webapp/jsp/mindmapEditor.jsp b/wise-webapp/src/main/webapp/jsp/mindmapEditor.jsp
index c0600a3e..50e8328d 100644
--- a/wise-webapp/src/main/webapp/jsp/mindmapEditor.jsp
+++ b/wise-webapp/src/main/webapp/jsp/mindmapEditor.jsp
@@ -72,7 +72,7 @@
-loader.js">
+