aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/api/Main.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/juick/api/Main.java')
-rw-r--r--src/main/java/com/juick/api/Main.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/main/java/com/juick/api/Main.java b/src/main/java/com/juick/api/Main.java
index c43804d7..09fb51ec 100644
--- a/src/main/java/com/juick/api/Main.java
+++ b/src/main/java/com/juick/api/Main.java
@@ -19,7 +19,10 @@ package com.juick.api;
import com.juick.Tag;
import com.juick.json.MessageSerializer;
-import com.juick.server.*;
+import com.juick.server.MessagesQueries;
+import com.juick.server.SubscriptionsQueries;
+import com.juick.server.TagQueries;
+import com.juick.server.UserQueries;
import com.juick.xmpp.JID;
import com.juick.xmpp.Message;
import com.juick.xmpp.Stream;
@@ -40,8 +43,6 @@ import java.io.IOException;
import java.io.PrintWriter;
import java.net.Socket;
import java.net.URL;
-import java.net.URLEncoder;
-import java.sql.Connection;
import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
@@ -68,11 +69,11 @@ public class Main extends HttpServlet implements Stream.StreamListener {
public void init() throws ServletException {
super.init();
try {
- LogManager.getLogManager().readConfiguration(getServletContext().getResourceAsStream("WEB-INF/logging.properties"));
+ LogManager.getLogManager().readConfiguration(getServletContext().getResourceAsStream("/WEB-INF/logging.properties"));
Properties conf = new Properties();
- conf.load(getServletContext().getResourceAsStream("WEB-INF/juick.conf"));
+ conf.load(getServletContext().getResourceAsStream("/WEB-INF/juick.conf"));
DriverManagerDataSource dataSource = new DriverManagerDataSource();
- dataSource.setDriverClassName(conf.getProperty("datasource_driver"));
+ dataSource.setDriverClassName(conf.getProperty("datasource_driver", "com.mysql.jdbc.Driver"));
dataSource.setUrl(conf.getProperty("datasource_url"));
jdbc = new JdbcTemplate(dataSource);
messages = new Messages(jdbc);