Browse Source

Remove support for Resin Servlet container

This commit removes all references to the Resin Servlet container, as it
is not supported as of Spring Framework 6.0 because we require a
JakartaEE baseline.

Closes gh-33772
pull/33778/head
Brian Clozel 1 year ago
parent
commit
d8c153a9d1
  1. 3
      framework-docs/modules/ROOT/pages/data-access/orm/jpa.adoc
  2. 2
      framework-docs/modules/ROOT/pages/web/webmvc/mvc-config/default-servlet-handler.adoc
  3. 5
      spring-context/src/main/java/org/springframework/instrument/classloading/ReflectiveLoadTimeWeaver.java
  4. 4
      spring-web/src/main/java/org/springframework/web/util/WebAppRootListener.java
  5. 10
      spring-webmvc/src/main/java/org/springframework/web/servlet/resource/DefaultServletHttpRequestHandler.java

3
framework-docs/modules/ROOT/pages/data-access/orm/jpa.adoc

@ -142,8 +142,7 @@ Alternatively, specify a custom `persistenceXmlLocation` on your @@ -142,8 +142,7 @@ Alternatively, specify a custom `persistenceXmlLocation` on your
META-INF/my-persistence.xml) and include only a descriptor with that name in your
application jar files. Because the Jakarta EE server looks only for default
`META-INF/persistence.xml` files, it ignores such custom persistence units and, hence,
avoids conflicts with a Spring-driven JPA setup upfront. (This applies to Resin 3.1, for
example.)
avoids conflicts with a Spring-driven JPA setup upfront.
.When is load-time weaving required?
****

2
framework-docs/modules/ROOT/pages/web/webmvc/mvc-config/default-servlet-handler.adoc

@ -21,7 +21,7 @@ The caveat to overriding the `/` Servlet mapping is that the `RequestDispatcher` @@ -21,7 +21,7 @@ The caveat to overriding the `/` Servlet mapping is that the `RequestDispatcher`
default Servlet must be retrieved by name rather than by path. The
`DefaultServletHttpRequestHandler` tries to auto-detect the default Servlet for
the container at startup time, using a list of known names for most of the major Servlet
containers (including Tomcat, Jetty, GlassFish, JBoss, Resin, WebLogic, and WebSphere).
containers (including Tomcat, Jetty, GlassFish, JBoss, WebLogic, and WebSphere).
If the default Servlet has been custom-configured with a different name, or if a
different Servlet container is being used where the default Servlet name is unknown,
then you must explicitly provide the default Servlet's name, as the following example shows:

5
spring-context/src/main/java/org/springframework/instrument/classloading/ReflectiveLoadTimeWeaver.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2024 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.
@ -53,9 +53,6 @@ import org.springframework.util.ReflectionUtils; @@ -53,9 +53,6 @@ import org.springframework.util.ReflectionUtils;
* web application). There is no direct API dependency between this LoadTimeWeaver
* adapter and the underlying ClassLoader, just a 'loose' method contract.
*
* <p>This is the LoadTimeWeaver to use, for example, with the Resin application server
* version 3.1+.
*
* @author Costin Leau
* @author Juergen Hoeller
* @since 2.0

4
spring-web/src/main/java/org/springframework/web/util/WebAppRootListener.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2024 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.
@ -35,7 +35,7 @@ import jakarta.servlet.ServletContextListener; @@ -35,7 +35,7 @@ import jakarta.servlet.ServletContextListener;
*
* <p><b>WARNING</b>: Some containers, for example, Tomcat, do NOT keep system properties separate
* per web app. You have to use unique "webAppRootKey" context-params per web app
* then, to avoid clashes. Other containers like Resin do isolate each web app's
* then, to avoid clashes. Other containers do isolate each web app's
* system properties: Here you can use the default key (i.e. no "webAppRootKey"
* context-param at all) without worrying.
*

10
spring-webmvc/src/main/java/org/springframework/web/servlet/resource/DefaultServletHttpRequestHandler.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2023 the original author or authors.
* Copyright 2002-2024 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.
@ -44,7 +44,7 @@ import org.springframework.web.context.ServletContextAware; @@ -44,7 +44,7 @@ import org.springframework.web.context.ServletContextAware;
* name specified through the {@link #setDefaultServletName "defaultServletName" property}.
* In most cases, the {@code defaultServletName} does not need to be set explicitly, as the
* handler checks at initialization time for the presence of the default Servlet of well-known
* containers such as Tomcat, Jetty, Resin, WebLogic and WebSphere. However, when running in a
* containers such as Tomcat, Jetty, WebLogic and WebSphere. However, when running in a
* container where the default Servlet's name is not known, or where it has been customized
* via server configuration, the {@code defaultServletName} will need to be set explicitly.
*
@ -60,9 +60,6 @@ public class DefaultServletHttpRequestHandler implements HttpRequestHandler, Ser @@ -60,9 +60,6 @@ public class DefaultServletHttpRequestHandler implements HttpRequestHandler, Ser
/** Default Servlet name used by Google App Engine. */
private static final String GAE_DEFAULT_SERVLET_NAME = "_ah_default";
/** Default Servlet name used by Resin. */
private static final String RESIN_DEFAULT_SERVLET_NAME = "resin-file";
/** Default Servlet name used by WebLogic. */
private static final String WEBLOGIC_DEFAULT_SERVLET_NAME = "FileServlet";
@ -99,9 +96,6 @@ public class DefaultServletHttpRequestHandler implements HttpRequestHandler, Ser @@ -99,9 +96,6 @@ public class DefaultServletHttpRequestHandler implements HttpRequestHandler, Ser
else if (this.servletContext.getNamedDispatcher(GAE_DEFAULT_SERVLET_NAME) != null) {
this.defaultServletName = GAE_DEFAULT_SERVLET_NAME;
}
else if (this.servletContext.getNamedDispatcher(RESIN_DEFAULT_SERVLET_NAME) != null) {
this.defaultServletName = RESIN_DEFAULT_SERVLET_NAME;
}
else if (this.servletContext.getNamedDispatcher(WEBLOGIC_DEFAULT_SERVLET_NAME) != null) {
this.defaultServletName = WEBLOGIC_DEFAULT_SERVLET_NAME;
}

Loading…
Cancel
Save