diff options
Diffstat (limited to 'src/main/java/com/juick/http')
-rw-r--r-- | src/main/java/com/juick/http/www/Main.java | 5 | ||||
-rw-r--r-- | src/main/java/com/juick/http/www/NewMessage.java | 8 |
2 files changed, 6 insertions, 7 deletions
diff --git a/src/main/java/com/juick/http/www/Main.java b/src/main/java/com/juick/http/www/Main.java index babeee1f..afa50016 100644 --- a/src/main/java/com/juick/http/www/Main.java +++ b/src/main/java/com/juick/http/www/Main.java @@ -38,6 +38,7 @@ import java.sql.SQLException; import java.util.Enumeration; import java.util.Properties; import java.util.concurrent.ExecutorService; +import java.util.logging.LogManager; /** * @@ -68,16 +69,16 @@ public class Main extends HttpServlet implements Stream.StreamListener { @Override public void init() throws ServletException { - super.init(); try { + LogManager.getLogManager().readConfiguration(getServletContext().getResourceAsStream("WEB-INF/logging.properties")); Properties conf = new Properties(); conf.load(getServletContext().getResourceAsStream("WEB-INF/juick.conf")); twitterAuth = new TwitterAuth(conf.getProperty("twitter_consumer_key"), 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); diff --git a/src/main/java/com/juick/http/www/NewMessage.java b/src/main/java/com/juick/http/www/NewMessage.java index c8eb6ede..a130c190 100644 --- a/src/main/java/com/juick/http/www/NewMessage.java +++ b/src/main/java/com/juick/http/www/NewMessage.java @@ -29,20 +29,18 @@ import com.juick.xmpp.extensions.JuickUser; import com.juick.xmpp.extensions.Nickname; import com.juick.xmpp.extensions.XOOB; import org.springframework.jdbc.core.JdbcTemplate; -import org.springframework.jdbc.core.namedparam.MapSqlParameterSource; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.PrintWriter; import java.io.UnsupportedEncodingException; import java.net.URL; import java.net.URLEncoder; -import java.sql.Connection; import java.util.ArrayList; import java.util.List; import java.util.logging.Logger; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; /** * |