diff options
author | Alex Bitney | 2016-02-07 22:13:22 +0200 |
---|---|---|
committer | Alex Bitney | 2016-02-07 22:13:22 +0200 |
commit | e87db525cb547d30e9e87bf4e3fe7dc4bac332dd (patch) | |
tree | 08811226fad88a27618c1f44d293ae3b94143e14 /src/main/java/com/juick/http/www | |
parent | 45b3e65ac62a030f997a4cc5131c424e643d7722 (diff) | |
parent | 8012bef3931221133d656c22399c4c8ec582e52e (diff) |
Merge branch 'develop' of ssh://den.jabber.ru/var/lib/git/com.juick.http.www into sans_branch
Diffstat (limited to 'src/main/java/com/juick/http/www')
-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; /** * |