diff --git a/spring-web/src/main/java/org/springframework/web/util/ServletRequestPathUtils.java b/spring-web/src/main/java/org/springframework/web/util/ServletRequestPathUtils.java index 31722320aa..200478ea55 100644 --- a/spring-web/src/main/java/org/springframework/web/util/ServletRequestPathUtils.java +++ b/spring-web/src/main/java/org/springframework/web/util/ServletRequestPathUtils.java @@ -39,7 +39,7 @@ import org.springframework.util.Assert; public abstract class ServletRequestPathUtils { /** Name of Servlet request attribute that holds the parsed {@link RequestPath}. */ - public static final String PATH_ATTRIBUTE = ServletRequestPathUtils.class.getName() + ".path"; + public static final String PATH_ATTRIBUTE = ServletRequestPathUtils.class.getName() + ".PATH"; /** diff --git a/spring-web/src/main/java/org/springframework/web/util/UrlPathHelper.java b/spring-web/src/main/java/org/springframework/web/util/UrlPathHelper.java index 2fd21b1875..8c23248ddf 100644 --- a/spring-web/src/main/java/org/springframework/web/util/UrlPathHelper.java +++ b/spring-web/src/main/java/org/springframework/web/util/UrlPathHelper.java @@ -58,9 +58,9 @@ public class UrlPathHelper { * {@link #getLookupPathForRequest resolved} lookupPath. * @since 5.3 */ - public static final String PATH_ATTRIBUTE = UrlPathHelper.class.getName() + ".path"; + public static final String PATH_ATTRIBUTE = UrlPathHelper.class.getName() + ".PATH"; - private static boolean isServlet4Present = + private static final boolean isServlet4Present = ClassUtils.isPresent("javax.servlet.http.HttpServletMapping", UrlPathHelper.class.getClassLoader());