summaryrefslogtreecommitdiffstats
path: root/policy-endpoints
diff options
context:
space:
mode:
authorJorge Hernandez <jorge.hernandez-herrero@att.com>2019-09-13 19:07:53 +0000
committerGerrit Code Review <gerrit@onap.org>2019-09-13 19:07:53 +0000
commit63922e3dc9101f019cb490f6c5d02991c10fcdf5 (patch)
tree2ffb8ceb137be4582220751f7a4c379ac9296521 /policy-endpoints
parent8a6487b5cc1402ed998ddc127a4bedc9585291d5 (diff)
parente9ef42d00f4d9f72639b6372db321ff761e96520 (diff)
Merge "Changes to accomodate to version of jetty"
Diffstat (limited to 'policy-endpoints')
-rw-r--r--policy-endpoints/src/main/java/org/onap/policy/common/endpoints/http/server/internal/JettyServletServer.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/http/server/internal/JettyServletServer.java b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/http/server/internal/JettyServletServer.java
index 45ccb06a..ba16ca76 100644
--- a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/http/server/internal/JettyServletServer.java
+++ b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/http/server/internal/JettyServletServer.java
@@ -21,22 +21,20 @@
package org.onap.policy.common.endpoints.http.server.internal;
import com.fasterxml.jackson.annotation.JsonIgnore;
-
import java.util.EnumSet;
-
import javax.servlet.DispatcherType;
-
import org.eclipse.jetty.security.ConstraintMapping;
import org.eclipse.jetty.security.ConstraintSecurityHandler;
import org.eclipse.jetty.security.HashLoginService;
import org.eclipse.jetty.security.UserStore;
import org.eclipse.jetty.security.authentication.BasicAuthenticator;
+import org.eclipse.jetty.server.CustomRequestLog;
import org.eclipse.jetty.server.HttpConfiguration;
import org.eclipse.jetty.server.HttpConnectionFactory;
import org.eclipse.jetty.server.SecureRequestCustomizer;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.ServerConnector;
-import org.eclipse.jetty.server.Slf4jRequestLog;
+import org.eclipse.jetty.server.Slf4jRequestLogWriter;
import org.eclipse.jetty.servlet.FilterHolder;
import org.eclipse.jetty.servlet.ServletContextHandler;
import org.eclipse.jetty.util.security.Constraint;
@@ -163,7 +161,10 @@ public abstract class JettyServletServer implements HttpServletServer, Runnable
this.context.setContextPath(ctxtPath);
this.jettyServer = new Server();
- this.jettyServer.setRequestLog(new Slf4jRequestLog());
+
+ CustomRequestLog requestLog =
+ new CustomRequestLog(new Slf4jRequestLogWriter(), CustomRequestLog.EXTENDED_NCSA_FORMAT);
+ this.jettyServer.setRequestLog(requestLog);
if (https) {
this.connector = httpsConnector();
@@ -204,7 +205,7 @@ public abstract class JettyServletServer implements HttpServletServer, Runnable
* @return the server connector
*/
public ServerConnector httpsConnector() {
- SslContextFactory sslContextFactory = new SslContextFactory();
+ SslContextFactory sslContextFactory = new SslContextFactory.Server();
String keyStore = System.getProperty(SYSTEM_KEYSTORE_PROPERTY_NAME);
if (keyStore != null) {