import java.io.IOException;
import java.io.PrintWriter;
+import java.security.KeyStore;
import java.util.Calendar;
import java.util.HashMap;
import java.util.LinkedList;
private static Gigi instance;
- private PingerDaemon pinger = new PingerDaemon();
+ private PingerDaemon pinger;
- public Gigi(Properties conf) {
+ public Gigi(Properties conf, KeyStore truststore) {
if (instance != null) {
throw new IllegalStateException("Multiple Gigi instances!");
}
instance = this;
DatabaseConnection.init(conf);
+ pinger = new PingerDaemon(truststore);
pinger.start();
}
final Page p = getPage(req.getPathInfo());
if (p != null) {
- if (!isSecure && (p.needsLogin() || p instanceof LoginPage || p instanceof RegisterPage)) {
+ if ( !isSecure && (p.needsLogin() || p instanceof LoginPage || p instanceof RegisterPage)) {
resp.sendRedirect("https://" + ServerConstants.getWwwHostNamePortSecure() + req.getPathInfo());
return;
}