示例#1
0
 private static void configureHttpConnector(Tomcat tomcat, TomcatConfig tomcatConfig) {
   Connector connector = tomcat.getConnector();
   connector.setProperty("server", "kicktipp");
   connector.setPort(tomcatConfig.getPort());
   connector.setRedirectPort(tomcatConfig.getSslPort());
   addCompression(connector);
 }
示例#2
0
 private static void configureHttpsConnector(Tomcat tomcat, TomcatConfig tomcatConfig) {
   Connector connector = new Connector();
   connector.setProperty("server", "jlot");
   connector.setPort(tomcatConfig.getSslPort());
   connector.setSecure(true);
   connector.setEnableLookups(false);
   connector.setScheme("https");
   connector.setAttribute("SSLEnabled", true);
   File file = new File("../kicktipp.org.keystore");
   String keystoreFile = file.getAbsolutePath();
   connector.setAttribute("keystoreFile", keystoreFile);
   connector.setAttribute("keyAlias", "tomcat");
   connector.setAttribute("keystorePass", "tomcat");
   connector.setAttribute("clientAuth", "false");
   connector.setAttribute("sslProtocol", "TLS");
   addCompression(connector);
   tomcat.getService().addConnector(connector);
 }