aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'juick-www/src/main/java')
-rw-r--r--juick-www/src/main/java/com/juick/www/configuration/WwwServletConfiguration.java10
1 files changed, 4 insertions, 6 deletions
diff --git a/juick-www/src/main/java/com/juick/www/configuration/WwwServletConfiguration.java b/juick-www/src/main/java/com/juick/www/configuration/WwwServletConfiguration.java
index 60a3b9cc..1654f2ac 100644
--- a/juick-www/src/main/java/com/juick/www/configuration/WwwServletConfiguration.java
+++ b/juick-www/src/main/java/com/juick/www/configuration/WwwServletConfiguration.java
@@ -20,6 +20,7 @@ package com.juick.www.configuration;
import com.juick.server.configuration.BaseWebConfiguration;
import com.mitchellbosecke.pebble.PebbleEngine;
import com.mitchellbosecke.pebble.extension.FormatterExtension;
+import com.mitchellbosecke.pebble.loader.ClasspathLoader;
import com.mitchellbosecke.pebble.loader.Loader;
import com.mitchellbosecke.pebble.loader.ServletLoader;
import com.mitchellbosecke.pebble.spring4.PebbleViewResolver;
@@ -71,12 +72,9 @@ public class WwwServletConfiguration extends BaseWebConfiguration {
configurer.enable();
}
- @Inject
- private ServletContext servletContext;
-
@Bean
- public Loader templateLoader(){
- return new ServletLoader(servletContext);
+ public Loader templateLoader() {
+ return new ClasspathLoader();
}
@Bean
@@ -97,7 +95,7 @@ public class WwwServletConfiguration extends BaseWebConfiguration {
@Bean
public ViewResolver viewResolver() {
PebbleViewResolver viewResolver = new PebbleViewResolver();
- viewResolver.setPrefix("/WEB-INF/");
+ viewResolver.setPrefix("templates");
viewResolver.setSuffix(".html");
viewResolver.setPebbleEngine(pebbleEngine());
viewResolver.setCharacterEncoding(CharEncoding.UTF_8);