summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJani Laakso <jani.laakso@itmill.com>2007-05-22 10:31:41 +0000
committerJani Laakso <jani.laakso@itmill.com>2007-05-22 10:31:41 +0000
commit0ac92fe1518cdb4049f2cf4f2bdf9fa099c2b188 (patch)
treedd64b1da7f379f9d6f11501f90974515cd7366fb
parentb6762f8882c26e0290ba5618f87bf4f93a9ed8f1 (diff)
downloadvaadin-framework-0ac92fe1518cdb4049f2cf4f2bdf9fa099c2b188.tar.gz
vaadin-framework-0ac92fe1518cdb4049f2cf4f2bdf9fa099c2b188.zip
Fix for #730
svn changeset:1447/svn branch:trunk
-rw-r--r--src/com/itmill/toolkit/terminal/web/ApplicationServlet.java16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/com/itmill/toolkit/terminal/web/ApplicationServlet.java b/src/com/itmill/toolkit/terminal/web/ApplicationServlet.java
index f8832ff91b..faaf1c183b 100644
--- a/src/com/itmill/toolkit/terminal/web/ApplicationServlet.java
+++ b/src/com/itmill/toolkit/terminal/web/ApplicationServlet.java
@@ -267,6 +267,7 @@ public class ApplicationServlet extends HttpServlet implements
// Gets the debug window parameter
String debug = getApplicationOrSystemProperty(PARAMETER_DEBUG, "")
.toLowerCase();
+
// Enables application specific debug
if (!"".equals(debug) && !"true".equals(debug)
&& !"false".equals(debug))
@@ -284,7 +285,8 @@ public class ApplicationServlet extends HttpServlet implements
// Gets cache time for transformers
this.transformerCacheTime = Integer
.parseInt(getApplicationOrSystemProperty(
- PARAMETER_TRANSFORMER_CACHETIME, "-1")) * 1000;
+
+ PARAMETER_TRANSFORMER_CACHETIME, "-1")) * 1000;
// Gets cache time for theme resources
this.themeCacheTime = Integer.parseInt(getApplicationOrSystemProperty(
@@ -304,15 +306,13 @@ public class ApplicationServlet extends HttpServlet implements
String[] defaultThemeFiles = new String[] { getApplicationOrSystemProperty(
PARAMETER_DEFAULT_THEME_JAR, DEFAULT_THEME_JAR) };
File f = findDefaultThemeJar(defaultThemeFiles);
+ boolean defaultThemeFound = false;
try {
// Adds themes.jar if exists
- if (f != null && f.exists())
+ if (f != null && f.exists()) {
this.themeSource.add(new JarThemeSource(f, this, ""));
- else {
- Log.warn("Default theme JAR not found in: "
- + Arrays.asList(defaultThemeFiles));
+ defaultThemeFound = true;
}
-
} catch (Exception e) {
throw new ServletException("Failed to load default theme from "
+ Arrays.asList(defaultThemeFiles), e);
@@ -320,6 +320,9 @@ public class ApplicationServlet extends HttpServlet implements
// Checks that at least one themesource was loaded
if (this.themeSource.getThemes().size() <= 0) {
+ if (!defaultThemeFound)
+ Log.warn("Default theme JAR not found in: "
+ + Arrays.asList(defaultThemeFiles));
throw new ServletException(
"No themes found in specified themesources. "
+ "You can provide themes by e.g. adding "
@@ -329,7 +332,6 @@ public class ApplicationServlet extends HttpServlet implements
// Initializes the transformer factory, if not initialized
if (this.transformerFactory == null) {
-
this.transformerFactory = new UIDLTransformerFactory(
this.themeSource, this, this.maxConcurrentTransformers,
this.transformerCacheTime);