diff --git a/examples/async-rest/async-rest-webapp/src/main/webapp/WEB-INF/jetty-web.xml b/examples/async-rest/async-rest-webapp/src/main/webapp/WEB-INF/jetty-web.xml index c15dc38f119..edff91dd75f 100644 --- a/examples/async-rest/async-rest-webapp/src/main/webapp/WEB-INF/jetty-web.xml +++ b/examples/async-rest/async-rest-webapp/src/main/webapp/WEB-INF/jetty-web.xml @@ -9,7 +9,7 @@ org.eclipse.jetty.servlet.WebApplicationContext object --> - - async-rest webapp is deployed. DO NOT USE IN PRODUCTION! + + The async-rest webapp is deployed. DO NOT USE IN PRODUCTION! diff --git a/jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootWithAnnotations.java b/jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootWithAnnotations.java index f6e0a307b67..4cfd2b58a6c 100644 --- a/jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootWithAnnotations.java +++ b/jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootWithAnnotations.java @@ -67,6 +67,8 @@ public class TestJettyOSGiBootWithAnnotations "com.sun.org.apache.xpath.internal.jaxp", "com.sun.org.apache.xpath.internal.objects")); options.addAll(TestOSGiUtil.coreJettyDependencies()); + // TODO uncomment and update the following once 9.4.19 is released with a fix for #3726 + // options.add(mavenBundle().groupId("org.eclipse.jetty").artifactId("jetty-util").version("9.4.19.v????????").noStart()); options.add(mavenBundle().groupId("org.eclipse.jetty").artifactId("jetty-alpn-java-client").versionAsInProject().start()); options.add(mavenBundle().groupId("org.eclipse.jetty").artifactId("jetty-alpn-client").versionAsInProject().start()); options.add(systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value(LOG_LEVEL)); diff --git a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/FilterMapping.java b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/FilterMapping.java index 2cc2a924a9c..ae84c52e3a4 100644 --- a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/FilterMapping.java +++ b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/FilterMapping.java @@ -152,7 +152,7 @@ public class FilterMapping implements Dumpable if (_holder==null) return false; if (_dispatches==0) - return type==REQUEST || type==ASYNC && holder.isAsyncSupported(); + return type==REQUEST || type==ASYNC && holder.isAsyncSupported(); return (_dispatches&type)!=0; } diff --git a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebAppConfiguration.java b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebAppConfiguration.java index e02d6ba14f1..a3f58df5cb5 100644 --- a/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebAppConfiguration.java +++ b/jetty-webapp/src/main/java/org/eclipse/jetty/webapp/WebAppConfiguration.java @@ -32,14 +32,10 @@ public class WebAppConfiguration extends AbstractConfiguration addDependencies(WebXmlConfiguration.class, MetaInfConfiguration.class, WebInfConfiguration.class); addDependents(JettyWebXmlConfiguration.class); protectAndExpose( - "org.eclipse.jetty.util.log.", - "org.eclipse.jetty.server.session.SessionData", - "org.eclipse.jetty.servlet.StatisticsServlet", + "org.eclipse.jetty.servlet.StatisticsServlet", "org.eclipse.jetty.servlet.DefaultServlet", - "org.eclipse.jetty.servlet.NoJspServlet", - "org.eclipse.jetty.continuation."); - expose( // TODO Evaluate why these are not protectAndExpose? - "org.eclipse.jetty.servlet.listener.", - "org.eclipse.jetty.alpn."); + "org.eclipse.jetty.servlet.NoJspServlet" + ); + expose("org.eclipse.jetty.servlet.listener."); } } diff --git a/tests/test-webapps/test-jaas-webapp/src/main/webapp/WEB-INF/jetty-web.xml b/tests/test-webapps/test-jaas-webapp/src/main/webapp/WEB-INF/jetty-web.xml index ecd5e307bb0..f782fdea14b 100644 --- a/tests/test-webapps/test-jaas-webapp/src/main/webapp/WEB-INF/jetty-web.xml +++ b/tests/test-webapps/test-jaas-webapp/src/main/webapp/WEB-INF/jetty-web.xml @@ -2,7 +2,7 @@ - - test-jaas webapp is deployed. DO NOT USE IN PRODUCTION! + + The test-jaas webapp is deployed. DO NOT USE IN PRODUCTION! diff --git a/tests/test-webapps/test-jetty-webapp/pom.xml b/tests/test-webapps/test-jetty-webapp/pom.xml index 43cbb391880..ef64ecfb3fe 100644 --- a/tests/test-webapps/test-jetty-webapp/pom.xml +++ b/tests/test-webapps/test-jetty-webapp/pom.xml @@ -141,6 +141,7 @@ org.eclipse.jetty jetty-servlets ${project.version} + provided org.eclipse.jetty.toolchain diff --git a/tests/test-webapps/test-jetty-webapp/src/main/webapp/WEB-INF/jetty-web.xml b/tests/test-webapps/test-jetty-webapp/src/main/webapp/WEB-INF/jetty-web.xml index dd7a9e572bb..7f0b1fed830 100644 --- a/tests/test-webapps/test-jetty-webapp/src/main/webapp/WEB-INF/jetty-web.xml +++ b/tests/test-webapps/test-jetty-webapp/src/main/webapp/WEB-INF/jetty-web.xml @@ -19,7 +19,8 @@ org.eclipse.jetty.servlet.WebApplicationContext object - - test webapp is deployed. DO NOT USE IN PRODUCTION! + + + The test-jetty webapp is deployed. DO NOT USE IN PRODUCTION! diff --git a/tests/test-webapps/test-jndi-webapp/src/main/webapp/WEB-INF/jetty-web.xml b/tests/test-webapps/test-jndi-webapp/src/main/webapp/WEB-INF/jetty-web.xml index 203f811885a..a0b5b042d2a 100644 --- a/tests/test-webapps/test-jndi-webapp/src/main/webapp/WEB-INF/jetty-web.xml +++ b/tests/test-webapps/test-jndi-webapp/src/main/webapp/WEB-INF/jetty-web.xml @@ -2,7 +2,7 @@ - - test-jndi webapp is deployed. DO NOT USE IN PRODUCTION! + + The test-jndi webapp is deployed. DO NOT USE IN PRODUCTION! diff --git a/tests/test-webapps/test-proxy-webapp/src/main/webapp/WEB-INF/jetty-web.xml b/tests/test-webapps/test-proxy-webapp/src/main/webapp/WEB-INF/jetty-web.xml index e2cb8ec33c4..e84ac1b8377 100644 --- a/tests/test-webapps/test-proxy-webapp/src/main/webapp/WEB-INF/jetty-web.xml +++ b/tests/test-webapps/test-proxy-webapp/src/main/webapp/WEB-INF/jetty-web.xml @@ -2,5 +2,8 @@ + + The test-proxy webapp is deployed. DO NOT USE IN PRODUCTION! + /proxy diff --git a/tests/test-webapps/test-servlet-spec/test-spec-webapp/pom.xml b/tests/test-webapps/test-servlet-spec/test-spec-webapp/pom.xml index fc3af8ed2c5..a47b61c39a3 100644 --- a/tests/test-webapps/test-servlet-spec/test-spec-webapp/pom.xml +++ b/tests/test-webapps/test-servlet-spec/test-spec-webapp/pom.xml @@ -73,6 +73,7 @@ org.eclipse.jetty.tests.test-spec-webapp Test Webapp for Servlet 3.1 Features + javax.transaction*;version="[1.1,1.3)", javax.servlet*;version="[2.6,4.1)", @@ -199,12 +200,6 @@ jakarta.transaction-api provided - - org.eclipse.jetty - jetty-server - ${project.version} - provided - org.eclipse.jetty.toolchain jetty-servlet-api @@ -215,21 +210,30 @@ jakarta.annotation-api provided - - org.eclipse.jetty.tests - test-web-fragment - ${project.version} - - - org.eclipse.jetty.tests - test-container-initializer - ${project.version} - - - org.eclipse.jetty - jetty-util - - 9.3.0.RC0 - + + org.eclipse.jetty.tests + test-web-fragment + ${project.version} + + + org.eclipse.jetty.tests + test-container-initializer + ${project.version} + + + + diff --git a/tests/test-webapps/test-servlet-spec/test-spec-webapp/src/main/java/com/acme/test/ClassLoaderServlet.java b/tests/test-webapps/test-servlet-spec/test-spec-webapp/src/main/java/com/acme/test/ClassLoaderServlet.java index ad348ff2a0d..0b7ce45b78b 100644 --- a/tests/test-webapps/test-servlet-spec/test-spec-webapp/src/main/java/com/acme/test/ClassLoaderServlet.java +++ b/tests/test-webapps/test-servlet-spec/test-spec-webapp/src/main/java/com/acme/test/ClassLoaderServlet.java @@ -31,8 +31,6 @@ import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.eclipse.jetty.util.IO; - @WebServlet(urlPatterns="/classloader") public class ClassLoaderServlet extends HttpServlet { @@ -48,6 +46,8 @@ public class ClassLoaderServlet extends HttpServlet writer.println(""); writer.println("

ClassLoader Isolation Test

"); + // TODO uncomment the following once 9.4.19 is released with a fix for #3726 + /* Class webappIO = IO.class; URI webappURI = getLocationOfClass(webappIO); String webappVersion = webappIO.getPackage().getImplementationVersion(); @@ -65,6 +65,7 @@ public class ClassLoaderServlet extends HttpServlet writer.println("
URI Result: FAIL

"); else writer.println("
URI Result: PASS

"); + */ writer.println(""); writer.println(""); diff --git a/tests/test-webapps/test-servlet-spec/test-spec-webapp/src/main/java/com/acme/test/MultiPartTest.java b/tests/test-webapps/test-servlet-spec/test-spec-webapp/src/main/java/com/acme/test/MultiPartTest.java index ad1b1cabdbc..e92abd8fa6b 100644 --- a/tests/test-webapps/test-servlet-spec/test-spec-webapp/src/main/java/com/acme/test/MultiPartTest.java +++ b/tests/test-webapps/test-servlet-spec/test-spec-webapp/src/main/java/com/acme/test/MultiPartTest.java @@ -19,6 +19,8 @@ package com.acme.test; import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; import java.util.Collection; import javax.servlet.ServletConfig; @@ -30,7 +32,6 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.Part; -import org.eclipse.jetty.util.IO; /** * MultiPartTest * @@ -58,7 +59,6 @@ public class MultiPartTest extends HttpServlet @Override public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { - try { response.setContentType("text/html"); @@ -78,7 +78,7 @@ public class MultiPartTest extends HttpServlet if (p.getContentType() == null || p.getContentType().startsWith("text/plain")) { out.println("

"); - IO.copy(p.getInputStream(),out); + copy(p.getInputStream(),out); out.println("

"); } } @@ -116,8 +116,21 @@ public class MultiPartTest extends HttpServlet throw new ServletException(e); } } - - - + // TODO remove inline once 9.4.19 is released with a fix for #3726 + public static void copy(InputStream in, + OutputStream out) + throws IOException + { + int bufferSize = 8192; + byte buffer[] = new byte[bufferSize]; + + while (true) + { + int len=in.read(buffer,0,bufferSize); + if (len<0 ) + break; + out.write(buffer,0,len); + } + } } diff --git a/tests/test-webapps/test-servlet-spec/test-spec-webapp/src/main/webapp/WEB-INF/jetty-web.xml b/tests/test-webapps/test-servlet-spec/test-spec-webapp/src/main/webapp/WEB-INF/jetty-web.xml index e360f5c202a..0938b414ccf 100644 --- a/tests/test-webapps/test-servlet-spec/test-spec-webapp/src/main/webapp/WEB-INF/jetty-web.xml +++ b/tests/test-webapps/test-servlet-spec/test-spec-webapp/src/main/webapp/WEB-INF/jetty-web.xml @@ -2,7 +2,12 @@ - - test-spec webapp is deployed. DO NOT USE IN PRODUCTION! + + The test-spec webapp is deployed. DO NOT USE IN PRODUCTION! +