diff options
-rw-r--r-- | src/com/itmill/toolkit/terminal/gwt/server/ApplicationServlet.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/com/itmill/toolkit/terminal/gwt/server/ApplicationServlet.java b/src/com/itmill/toolkit/terminal/gwt/server/ApplicationServlet.java index 56c1f3d080..647cc131f6 100644 --- a/src/com/itmill/toolkit/terminal/gwt/server/ApplicationServlet.java +++ b/src/com/itmill/toolkit/terminal/gwt/server/ApplicationServlet.java @@ -505,7 +505,8 @@ public class ApplicationServlet extends HttpServlet { + "\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n"); page - .write("<html xmlns=\"http://www.w3.org/1999/xhtml\" style=\"width:100%;height:100%;border:0;margin:0;\">\n<head>\n<title>IT Mill Toolkit 5</title>\n" + .write("<html xmlns=\"http://www.w3.org/1999/xhtml\" style=\"width:100%;" + + "height:100%;border:0;margin:0;\">\n<head>\n<title>IT Mill Toolkit 5</title>\n" + "<script type=\"text/javascript\">\n" + " var itmill = {\n" + " appUri:'"); @@ -517,11 +518,18 @@ public class ApplicationServlet extends HttpServlet { if (applicationRunnerMode) { final String[] URIparts = getApplicationRunnerURIs(request); widgetsetUrl = URIparts[0]; + if (widgetsetUrl.equals("/")) { + widgetsetUrl = ""; + } appUrl = URIparts[1]; } else { final String[] urlParts = getApplicationUrl(request).toString() .split("\\/"); - widgetsetUrl = "/" + urlParts[3]; + widgetsetUrl = ""; + // if context is specified add it to widgetsetUrl + if (urlParts[3].equals(request.getContextPath())) { + widgetsetUrl += urlParts[3]; + } for (int i = 3; i < urlParts.length; i++) { appUrl += "/" + urlParts[i]; } |