Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,11 @@ private void checkCommit() {
}
}

@Override
public void sendRedirect(String string, int i, boolean bln) throws IOException {
throw new UnsupportedOperationException("Not supported yet.");
}

private static class FakeServletOutputStream extends ServletOutputStream {

private final ByteArrayOutputStream byteStream;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,14 @@ public String getQuickStartClasspath() {
Boolean.getBoolean("appengine.use.EE10")
? new File(getSdkRoot(), "lib/tools/quickstart/quickstartgenerator-jetty12-ee10.jar")
: new File(getSdkRoot(), "lib/tools/quickstart/quickstartgenerator-jetty12.jar");
String avoidJars = Boolean.getBoolean("appengine.use.EE10") ? "ee8" : "ee10";
String avoidJars = Boolean.getBoolean("appengine.use.EE10") ? "ee8" : "ee11";

File jettyDir = new File(getSdkRoot(), JETTY12_HOME_LIB_PATH);
for (File f : jettyDir.listFiles()) {
if (!f.isDirectory()
&& !(f.getName().contains("cdi-")
|| f.getName().contains("ee9")
|| f.getName().contains("ee10")
|| f.getName().contains(avoidJars))) {
list.add(f.getAbsolutePath());
}
Expand All @@ -134,12 +135,17 @@ public String getQuickStartClasspath() {
// Note: Do not put the Apache JSP files in the classpath. If needed, they should be part of
// the application itself under WEB-INF/lib.
if (Boolean.getBoolean("appengine.use.EE10")) {
for (String subdir : new String[] {"ee10-annotations"}) {
for (String subdir : new String[] {"ee11-annotations"}) {
for (File f : new File(jettyDir, subdir).listFiles()) {
list.add(f.getAbsolutePath());
}
}
for (String subdir : new String[] {"ee10-jaspi"}) {
for (String subdir : new String[] {"annotations"}) {
for (File f : new File(jettyDir, subdir).listFiles()) {
list.add(f.getAbsolutePath());
}
}
for (String subdir : new String[] {"ee11-jaspi"}) {
for (File f : new File(jettyDir, subdir).listFiles()) {
list.add(f.getAbsolutePath());
}
Expand Down Expand Up @@ -171,9 +177,10 @@ private List<File> getImplLibFiles() {
lf.addAll(getJetty12Jars("logging"));
// We also want the devserver to be able to handle annotated servlet, via ASM:
if (Boolean.getBoolean("appengine.use.EE10")) {
lf.addAll(getJetty12Jars("ee10-annotations"));
lf.addAll(getJetty12Jars("ee10-apache-jsp"));
lf.addAll(getJetty12Jars("ee10-glassfish-jstl"));
lf.addAll(getJetty12Jars("annotations"));
lf.addAll(getJetty12Jars("ee11-annotations"));
lf.addAll(getJetty12Jars("ee11-apache-jsp"));
lf.addAll(getJetty12Jars("ee11-glassfish-jstl"));
} else {
lf.addAll(getJetty12Jars("ee8-annotations"));
lf.addAll(getJetty12Jars("ee8-apache-jsp"));
Expand Down Expand Up @@ -223,7 +230,8 @@ private List<File> getJetty12Jars(String subDir) {
// in our runtime (private Jetty dependency we do not want to expose to the customer).
if (!(f.getName().contains("-cdi-")
|| f.getName().contains("jetty-servlet-api-") // no javax. if needed should be in shared
|| f.getName().contains("ee9") // we want ee10 only. jakarta apis should be in shared
|| f.getName().contains("ee9") // we want ee11 only. jakarta apis should be in shared
|| f.getName().contains("ee10") // we want ee11 only. jakarta apis should be in shared
|| f.getName().contains("jetty-jakarta-servlet-api") // old
)) {
jars.add(f);
Expand All @@ -236,9 +244,9 @@ private List<File> getJetty12Jars(String subDir) {
List<File> getJetty12JspJars() {

if (Boolean.getBoolean("appengine.use.EE10")) {
List<File> lf = getJetty12Jars("ee10-apache-jsp");
lf.addAll(getJetty12Jars("ee10-glassfish-jstl"));
lf.add(getJetty12Jar("ee10-servlet-"));
List<File> lf = getJetty12Jars("ee11-apache-jsp");
lf.addAll(getJetty12Jars("ee11-glassfish-jstl"));
lf.add(getJetty12Jar("ee11-servlet-"));
return lf;
}
List<File> lf = getJetty12Jars("ee8-apache-jsp");
Expand Down
4 changes: 2 additions & 2 deletions appengine_setup/testapps/jetty12_testapp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
<version>${jetty.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.ee10</groupId>
<artifactId>jetty-ee10-servlet</artifactId>
<groupId>org.eclipse.jetty.ee11</groupId>
<artifactId>jetty-ee11-servlet</artifactId>
<version>${jetty.version}</version>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import com.google.appengine.setup.testapps.jetty12.servlets.TaskQueueTestServlet;
import jakarta.servlet.DispatcherType;
import java.util.EnumSet;
import org.eclipse.jetty.ee10.servlet.ServletHandler;
import org.eclipse.jetty.ee11.servlet.ServletHandler;
import org.eclipse.jetty.server.Connector;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.ServerConnector;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1674,7 +1674,7 @@ public void testStageGaeStandardJava8WithOnlyJasperContextInitializer()
} else if (Boolean.getBoolean("appengine.use.EE10")) {
expectedJasperInitializer
= "\"ContainerInitializer"
+ "{org.eclipse.jetty.ee10.apache.jsp.JettyJasperInitializer"
+ "{org.eclipse.jetty.ee11.apache.jsp.JettyJasperInitializer"
+ ",interested=[],applicable=[],annotated=[]}\"";
} else {
expectedJasperInitializer
Expand Down
12 changes: 6 additions & 6 deletions jetty12_assembly/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@
<destFileName>org.eclipse.jetty.ee8.apache-jsp-${jetty12.version}-nolog.jar</destFileName>
</artifactItem>
<artifactItem>
<groupId>org.eclipse.jetty.ee10</groupId>
<artifactId>jetty-ee10-apache-jsp</artifactId>
<groupId>org.eclipse.jetty.ee11</groupId>
<artifactId>jetty-ee11-apache-jsp</artifactId>
<overWrite>true</overWrite>
<classifier>nolog</classifier>
<outputDirectory>${assembly-directory}/jetty12/jetty-home/lib/ee10-apache-jsp</outputDirectory>
<destFileName>org.eclipse.jetty.ee10.apache-jsp-${jetty12.version}-nolog.jar</destFileName>
<outputDirectory>${assembly-directory}/jetty12/jetty-home/lib/ee11-apache-jsp</outputDirectory>
<destFileName>org.eclipse.jetty.ee11.apache-jsp-${jetty12.version}-nolog.jar</destFileName>
</artifactItem>
</artifactItems>
</configuration>
Expand Down Expand Up @@ -130,8 +130,8 @@
<version>${jetty12.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.ee10</groupId>
<artifactId>jetty-ee10-apache-jsp</artifactId>
<groupId>org.eclipse.jetty.ee11</groupId>
<artifactId>jetty-ee11-apache-jsp</artifactId>
<version>${jetty12.version}</version>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1029,7 +1029,7 @@ private void fallThroughToRuntimeOnContextInitializers() {
String containerInitializer = matcher.group(1);
if ("org.eclipse.jetty.apache.jsp.JettyJasperInitializer".equals(containerInitializer)
|| "org.eclipse.jetty.ee8.apache.jsp.JettyJasperInitializer".equals(containerInitializer)
|| "org.eclipse.jetty.ee10.apache.jsp.JettyJasperInitializer"
|| "org.eclipse.jetty.ee11.apache.jsp.JettyJasperInitializer"
.equals(containerInitializer)) {
foundJasperInitializer = true;
}
Expand Down
4 changes: 2 additions & 2 deletions local_runtime_shared_jetty12/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@
<build>
<plugins>
<plugin>
<groupId>org.eclipse.jetty.ee10</groupId>
<artifactId>jetty-ee10-jspc-maven-plugin</artifactId>
<groupId>org.eclipse.jetty.ee11</groupId>
<artifactId>jetty-ee11-jspc-maven-plugin</artifactId>
<version>${jetty12.version}</version>
<executions>
<execution>
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jetty.version>9.4.57.v20241219</jetty.version>
<jetty12.version>12.0.23</jetty12.version>
<jetty12.version>12.1.0.beta2</jetty12.version>
<slf4j.version>2.0.17</slf4j.version>
<distributionManagement.snapshot.url>https://oss.sonatype.org/content/repositories/google-snapshots/</distributionManagement.snapshot.url>
<distributionManagement.snapshot.id>sonatype-nexus-snapshots</distributionManagement.snapshot.id>
Expand Down Expand Up @@ -499,7 +499,7 @@
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>6.0.0</version> <!-- keep -->
<version>6.1.0</version> <!-- keep -->
</dependency>
<dependency>
<groupId>javax.servlet.jsp.jstl</groupId>
Expand Down
4 changes: 2 additions & 2 deletions quickstartgenerator_jetty12_ee10/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
<name>AppEngine :: quickstartgenerator Jetty12 EE10</name>
<dependencies>
<dependency>
<groupId>org.eclipse.jetty.ee10</groupId>
<artifactId>jetty-ee10-quickstart</artifactId>
<groupId>org.eclipse.jetty.ee11</groupId>
<artifactId>jetty-ee11-quickstart</artifactId>
<version>${jetty12.version}</version>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
package com.google.appengine.tools.development.jetty;

import java.io.File;
import org.eclipse.jetty.ee10.quickstart.QuickStartConfiguration;
import org.eclipse.jetty.ee10.webapp.WebAppContext;
import org.eclipse.jetty.ee11.quickstart.QuickStartConfiguration;
import org.eclipse.jetty.ee11.webapp.WebAppContext;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.util.IO;
import org.eclipse.jetty.util.resource.ResourceFactory;
Expand Down
20 changes: 10 additions & 10 deletions runtime/local_jetty12/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@
<version>${project.version}</version>
<exclusions>
<exclusion>
<groupId>org.eclipse.jetty.ee10</groupId>
<artifactId>jetty-ee10-servlet</artifactId>
<groupId>org.eclipse.jetty.ee11</groupId>
<artifactId>jetty-ee11-servlet</artifactId>
</exclusion>
</exclusions>
</dependency>
Expand All @@ -164,20 +164,20 @@
<version>${project.version}</version>
<exclusions>
<exclusion>
<groupId>org.eclipse.jetty.ee10</groupId>
<artifactId>jetty-ee10-annotations</artifactId>
<groupId>org.eclipse.jetty.ee11</groupId>
<artifactId>jetty-ee11-annotations</artifactId>
</exclusion>
<exclusion>
<groupId>org.eclipse.jetty.ee10</groupId>
<artifactId>jetty-ee10-apache-jsp</artifactId>
<groupId>org.eclipse.jetty.ee11</groupId>
<artifactId>jetty-ee11-apache-jsp</artifactId>
</exclusion>
<exclusion>
<groupId>org.eclipse.jetty.ee10</groupId>
<artifactId>jetty-ee10-webapp</artifactId>
<groupId>org.eclipse.jetty.ee11</groupId>
<artifactId>jetty-ee11-webapp</artifactId>
</exclusion>
<exclusion>
<groupId>org.eclipse.jetty.ee10</groupId>
<artifactId>jetty-ee10-servlet</artifactId>
<groupId>org.eclipse.jetty.ee11</groupId>
<artifactId>jetty-ee11-servlet</artifactId>
</exclusion>
</exclusions>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.Semaphore;
Expand Down Expand Up @@ -509,9 +510,12 @@ private void fullWebAppScanner(int interval) throws IOException {
scanner.setReportExistingFilesOnStartup(false);
scanner.setScanDepth(3);

scanner.addListener((Scanner.BulkListener) filenames -> {
log.info("A file has changed, reloading the web application.");
reloadWebApp();
scanner.addListener(new Scanner.BulkListener() {
@Override
public void pathsChanged(Map<Path, Scanner.Notification> changeSet) throws Exception {
log.info("A file has changed, reloading the web application.");
reloadWebApp();
}
});

LifeCycle.start(scanner);
Expand Down
16 changes: 8 additions & 8 deletions runtime/local_jetty12_ee10/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@
<artifactId>proto1</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.ee10</groupId>
<artifactId>jetty-ee10-webapp</artifactId>
<groupId>org.eclipse.jetty.ee11</groupId>
<artifactId>jetty-ee11-webapp</artifactId>
<version>${jetty12.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.ee10</groupId>
<artifactId>jetty-ee10-servlet</artifactId>
<groupId>org.eclipse.jetty.ee11</groupId>
<artifactId>jetty-ee11-servlet</artifactId>
<version>${jetty12.version}</version>
</dependency>
<dependency>
Expand All @@ -93,8 +93,8 @@
<version>${jetty12.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.ee10</groupId>
<artifactId>jetty-ee10-annotations</artifactId>
<groupId>org.eclipse.jetty.ee11</groupId>
<artifactId>jetty-ee11-annotations</artifactId>
<version>${jetty12.version}</version>
</dependency>
<dependency>
Expand All @@ -104,8 +104,8 @@

</dependency>
<dependency>
<groupId>org.eclipse.jetty.ee10</groupId>
<artifactId>jetty-ee10-apache-jsp</artifactId>
<groupId>org.eclipse.jetty.ee11</groupId>
<artifactId>jetty-ee11-apache-jsp</artifactId>
<version>${jetty12.version}</version>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
import jakarta.servlet.ServletContainerInitializer;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.jetty.ee10.annotations.AnnotationConfiguration;
import org.eclipse.jetty.ee10.apache.jsp.JettyJasperInitializer;
import org.eclipse.jetty.ee11.annotations.AnnotationConfiguration;
import org.eclipse.jetty.ee11.apache.jsp.JettyJasperInitializer;

/**
* Customization of AnnotationConfiguration which correctly configures the JSP Jasper initializer.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
import com.google.apphosting.api.ApiProxy;
import com.google.apphosting.runtime.jetty.EE10AppEngineAuthentication;
import java.io.File;
import org.eclipse.jetty.ee10.servlet.security.ConstraintSecurityHandler;
import org.eclipse.jetty.ee10.webapp.WebAppContext;
import org.eclipse.jetty.ee11.servlet.security.ConstraintSecurityHandler;
import org.eclipse.jetty.ee11.webapp.WebAppContext;
import org.eclipse.jetty.security.Constraint;
import org.eclipse.jetty.security.SecurityHandler;
import org.eclipse.jetty.server.Request;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
import java.util.List;
import java.util.Set;
import java.util.logging.Logger;
import org.eclipse.jetty.ee10.servlet.security.ConstraintMapping;
import org.eclipse.jetty.ee10.servlet.security.ConstraintSecurityHandler;
import org.eclipse.jetty.ee11.servlet.security.ConstraintMapping;
import org.eclipse.jetty.ee11.servlet.security.ConstraintSecurityHandler;
import org.eclipse.jetty.http.HttpField;
import org.eclipse.jetty.security.Constraint;
import org.eclipse.jetty.server.Context;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import jakarta.servlet.ServletException;
import java.lang.reflect.InvocationTargetException;
import org.apache.tomcat.InstanceManager;
import org.eclipse.jetty.ee10.jsp.JettyJspServlet;
import org.eclipse.jetty.ee11.jsp.JettyJspServlet;

/** {@code FixupJspServlet} adds some logic to work around bugs in the Jasper {@link JspServlet}. */
public class FixupJspServlet extends JettyJspServlet {
Expand Down
Loading
Loading