diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/com/juick/JuickApplication.java | 6 | ||||
-rw-r--r-- | src/main/java/com/juick/http/www/Main.java | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/src/main/java/com/juick/JuickApplication.java b/src/main/java/com/juick/JuickApplication.java index e546f5a8..2696ba39 100644 --- a/src/main/java/com/juick/JuickApplication.java +++ b/src/main/java/com/juick/JuickApplication.java @@ -31,10 +31,8 @@ public class JuickApplication { private JdbcTemplate sql; private JdbcTemplate sqlSearch; private List<JuickComponent> components = new ArrayList<>(); - private String applicationPath; - public JuickApplication(Properties conf, String applicationPath) throws IOException { - this.applicationPath = applicationPath; + public JuickApplication(Properties conf) throws IOException { executorService = Executors.newWorkStealingPool(); initDataSources(conf); initSockets(conf); @@ -45,7 +43,7 @@ public class JuickApplication { private void initRythm(Properties conf) { String rythmMode = conf.getProperty("rythm_mode", "prod"); Map<String, Object> map = new HashMap<>(); - map.put("home.template", applicationPath+"/WEB-INF/classes/templates"); + map.put("home.template", "templates"); map.put("rythm.engine.mode", rythmMode); Rythm.init(map); } diff --git a/src/main/java/com/juick/http/www/Main.java b/src/main/java/com/juick/http/www/Main.java index babeee1f..acc6e713 100644 --- a/src/main/java/com/juick/http/www/Main.java +++ b/src/main/java/com/juick/http/www/Main.java @@ -77,7 +77,7 @@ public class Main extends HttpServlet implements Stream.StreamListener { conf.getProperty("twitter_consumer_secret")); PageTemplates.sape = new Sape(conf.getProperty("sape_user"), "juick.com", 2000, 3600); Endpoints.wwwJuickCom = conf.getProperty("www_juick_com", "juick.com"); - app = new JuickApplication(conf, getServletContext().getRealPath("/")); + app = new JuickApplication(conf); sql = app.getSql(); sqlSearch = app.getSqlSearch(); pagesNewMessage = new NewMessage(app); |