diff --git a/spring-boot-dependencies/pom.xml b/spring-boot-dependencies/pom.xml
index 9284ab56830..228ef9630e6 100644
--- a/spring-boot-dependencies/pom.xml
+++ b/spring-boot-dependencies/pom.xml
@@ -109,7 +109,7 @@
2.9.02.242.0.4
- 9.3.14.v20161028
+ 9.4.0.v201612082.2.0.v2011120111588.0.331.1-rev-1
diff --git a/spring-boot-integration-tests/spring-boot-gradle-tests/src/test/java/org/springframework/boot/gradle/WarPackagingTests.java b/spring-boot-integration-tests/spring-boot-gradle-tests/src/test/java/org/springframework/boot/gradle/WarPackagingTests.java
index 9f2a384933e..809228541d4 100644
--- a/spring-boot-integration-tests/spring-boot-gradle-tests/src/test/java/org/springframework/boot/gradle/WarPackagingTests.java
+++ b/spring-boot-integration-tests/spring-boot-gradle-tests/src/test/java/org/springframework/boot/gradle/WarPackagingTests.java
@@ -50,8 +50,8 @@ public class WarPackagingTests {
private static final Set JETTY_EXPECTED_IN_WEB_INF_LIB_PROVIDED = new HashSet(
Arrays.asList("spring-boot-starter-jetty-", "jetty-continuation",
- "jetty-util-", "javax.servlet-", "jetty-io-", "jetty-http-",
- "jetty-server-", "jetty-security-", "jetty-servlet-",
+ "jetty-util-", "javax.servlet-", "jetty-client", "jetty-io-",
+ "jetty-http-", "jetty-server-", "jetty-security-", "jetty-servlet-",
"jetty-servlets", "jetty-webapp-", "websocket-api",
"javax.annotation-api", "jetty-plus", "javax-websocket-server-impl-",
"apache-el", "asm-", "javax.websocket-api-", "asm-tree-",
diff --git a/spring-boot-samples/pom.xml b/spring-boot-samples/pom.xml
index 8e8440307cc..2bc2998aca6 100644
--- a/spring-boot-samples/pom.xml
+++ b/spring-boot-samples/pom.xml
@@ -61,6 +61,7 @@
spring-boot-sample-jetty8spring-boot-sample-jetty8-sslspring-boot-sample-jetty92
+ spring-boot-sample-jetty93spring-boot-sample-jooqspring-boot-sample-jpaspring-boot-sample-jta-atomikos
@@ -108,6 +109,7 @@
spring-boot-sample-web-thymeleaf3spring-boot-sample-web-uispring-boot-sample-websocket-jetty
+ spring-boot-sample-websocket-jetty93spring-boot-sample-websocket-tomcatspring-boot-sample-websocket-undertowspring-boot-sample-webservices
diff --git a/spring-boot-samples/spring-boot-sample-jetty93/pom.xml b/spring-boot-samples/spring-boot-sample-jetty93/pom.xml
new file mode 100644
index 00000000000..bd34768bb97
--- /dev/null
+++ b/spring-boot-samples/spring-boot-sample-jetty93/pom.xml
@@ -0,0 +1,50 @@
+
+
+ 4.0.0
+
+
+ org.springframework.boot
+ spring-boot-samples
+ 1.5.0.BUILD-SNAPSHOT
+
+ spring-boot-sample-jetty93
+ Spring Boot Jetty 9.3 Sample
+ Spring Boot Jetty 9.3 Sample
+ http://projects.spring.io/spring-boot/
+
+ Pivotal Software, Inc.
+ http://www.spring.io
+
+
+ ${basedir}/../..
+ 9.3.14.v20161028
+
+
+
+ org.springframework.boot
+ spring-boot-starter
+
+
+ org.springframework.boot
+ spring-boot-starter-jetty
+
+
+ org.springframework
+ spring-webmvc
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+
+
+
diff --git a/spring-boot-samples/spring-boot-sample-jetty93/src/main/java/sample/jetty93/ExampleServletContextListener.java b/spring-boot-samples/spring-boot-sample-jetty93/src/main/java/sample/jetty93/ExampleServletContextListener.java
new file mode 100644
index 00000000000..d0fba6f33b2
--- /dev/null
+++ b/spring-boot-samples/spring-boot-sample-jetty93/src/main/java/sample/jetty93/ExampleServletContextListener.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2012-2014 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package sample.jetty93;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+
+import org.springframework.stereotype.Component;
+
+/**
+ * Simple {@link ServletContextListener} to test gh-2058.
+ */
+@Component
+public class ExampleServletContextListener implements ServletContextListener {
+
+ @Override
+ public void contextInitialized(ServletContextEvent sce) {
+ System.out.println("*** contextInitialized");
+ }
+
+ @Override
+ public void contextDestroyed(ServletContextEvent sce) {
+ System.out.println("*** contextDestroyed");
+ }
+
+}
diff --git a/spring-boot-samples/spring-boot-sample-jetty93/src/main/java/sample/jetty93/SampleJetty93Application.java b/spring-boot-samples/spring-boot-sample-jetty93/src/main/java/sample/jetty93/SampleJetty93Application.java
new file mode 100644
index 00000000000..114bb9eb142
--- /dev/null
+++ b/spring-boot-samples/spring-boot-sample-jetty93/src/main/java/sample/jetty93/SampleJetty93Application.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2012-2013 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package sample.jetty93;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+public class SampleJetty93Application {
+
+ public static void main(String[] args) throws Exception {
+ SpringApplication.run(SampleJetty93Application.class, args);
+ }
+
+}
diff --git a/spring-boot-samples/spring-boot-sample-jetty93/src/main/java/sample/jetty93/service/HelloWorldService.java b/spring-boot-samples/spring-boot-sample-jetty93/src/main/java/sample/jetty93/service/HelloWorldService.java
new file mode 100644
index 00000000000..ef364f599cf
--- /dev/null
+++ b/spring-boot-samples/spring-boot-sample-jetty93/src/main/java/sample/jetty93/service/HelloWorldService.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2012-2013 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package sample.jetty93.service;
+
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
+
+@Component
+public class HelloWorldService {
+
+ @Value("${name:World}")
+ private String name;
+
+ public String getHelloMessage() {
+ return "Hello " + this.name;
+ }
+
+}
diff --git a/spring-boot-samples/spring-boot-sample-jetty93/src/main/java/sample/jetty93/web/SampleController.java b/spring-boot-samples/spring-boot-sample-jetty93/src/main/java/sample/jetty93/web/SampleController.java
new file mode 100644
index 00000000000..e7c23183f14
--- /dev/null
+++ b/spring-boot-samples/spring-boot-sample-jetty93/src/main/java/sample/jetty93/web/SampleController.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2012-2016 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package sample.jetty93.web;
+
+import java.util.Date;
+
+import javax.servlet.http.HttpServletRequest;
+
+import sample.jetty93.service.HelloWorldService;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+@Controller
+public class SampleController {
+
+ @Autowired
+ private HelloWorldService helloWorldService;
+
+ @GetMapping("/")
+ @ResponseBody
+ public String helloWorld(HttpServletRequest request) {
+ request.getSession(true).setAttribute("date", new Date());
+ return this.helloWorldService.getHelloMessage();
+ }
+
+}
diff --git a/spring-boot-samples/spring-boot-sample-jetty93/src/main/resources/application.properties b/spring-boot-samples/spring-boot-sample-jetty93/src/main/resources/application.properties
new file mode 100644
index 00000000000..005a635ad36
--- /dev/null
+++ b/spring-boot-samples/spring-boot-sample-jetty93/src/main/resources/application.properties
@@ -0,0 +1,4 @@
+server.compression.enabled: true
+server.compression.min-response-size: 1
+server.jetty.acceptors=2
+server.session.persistent=true
diff --git a/spring-boot-samples/spring-boot-sample-jetty93/src/test/java/sample/jetty93/SampleJettyApplicationTests.java b/spring-boot-samples/spring-boot-sample-jetty93/src/test/java/sample/jetty93/SampleJettyApplicationTests.java
new file mode 100644
index 00000000000..e311e2f92c6
--- /dev/null
+++ b/spring-boot-samples/spring-boot-sample-jetty93/src/test/java/sample/jetty93/SampleJettyApplicationTests.java
@@ -0,0 +1,84 @@
+/*
+ * Copyright 2012-2016 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package sample.jetty93;
+
+import java.io.ByteArrayInputStream;
+import java.nio.charset.Charset;
+import java.util.zip.GZIPInputStream;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
+import org.springframework.boot.test.web.client.TestRestTemplate;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.test.annotation.DirtiesContext;
+import org.springframework.test.context.junit4.SpringRunner;
+import org.springframework.util.StreamUtils;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+/**
+ * Basic integration tests for demo application.
+ *
+ * @author Dave Syer
+ * @author Andy Wilkinson
+ */
+@RunWith(SpringRunner.class)
+@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
+@DirtiesContext
+public class SampleJettyApplicationTests {
+
+ @Autowired
+ private TestRestTemplate restTemplate;
+
+ @Test
+ public void testHome() throws Exception {
+ ResponseEntity entity = this.restTemplate.getForEntity("/", String.class);
+ assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.OK);
+ assertThat(entity.getBody()).isEqualTo("Hello World");
+ }
+
+ @Test
+ public void testCompression() throws Exception {
+ HttpHeaders requestHeaders = new HttpHeaders();
+ requestHeaders.set("Accept-Encoding", "gzip");
+ HttpEntity> requestEntity = new HttpEntity