This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 11.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/11.0.x by this push: new 43473e3da0 Add Java 25 support for JSP compilation 43473e3da0 is described below commit 43473e3da088affedf2628cb670d38e2609b7661 Author: Mark Thomas <ma...@apache.org> AuthorDate: Fri Mar 28 11:55:31 2025 +0000 Add Java 25 support for JSP compilation --- java/org/apache/jasper/compiler/JDTCompiler.java | 11 +++++++++++ webapps/docs/changelog.xml | 7 +++++++ 2 files changed, 18 insertions(+) diff --git a/java/org/apache/jasper/compiler/JDTCompiler.java b/java/org/apache/jasper/compiler/JDTCompiler.java index aaf1975965..554d1adb6e 100644 --- a/java/org/apache/jasper/compiler/JDTCompiler.java +++ b/java/org/apache/jasper/compiler/JDTCompiler.java @@ -318,6 +318,11 @@ public class JDTCompiler extends org.apache.jasper.compiler.Compiler { // Tomcat. May be supported in a snapshot build. // This is checked against the actual version below. settings.put(CompilerOptions.OPTION_Source, "24"); + } else if (opt.equals("25")) { + // Constant not available in latest ECJ version shipped with + // Tomcat. May be supported in a snapshot build. + // This is checked against the actual version below. + settings.put(CompilerOptions.OPTION_Source, "25"); } else { log.warn(Localizer.getMessage("jsp.warning.unknown.sourceVM", opt)); settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_17); @@ -403,6 +408,12 @@ public class JDTCompiler extends org.apache.jasper.compiler.Compiler { // This is checked against the actual version below. settings.put(CompilerOptions.OPTION_TargetPlatform, "24"); settings.put(CompilerOptions.OPTION_Compliance, "24"); + } else if (opt.equals("25")) { + // Constant not available in latest ECJ version shipped with + // Tomcat. May be supported in a snapshot build. + // This is checked against the actual version below. + settings.put(CompilerOptions.OPTION_TargetPlatform, "25"); + settings.put(CompilerOptions.OPTION_Compliance, "25"); } else { log.warn(Localizer.getMessage("jsp.warning.unknown.targetVM", opt)); settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_17); diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 45f1b4f076..70e9c2a56b 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -190,6 +190,13 @@ exploded web applications. The <code>compilerClassName</code> to use is <code>org.apache.jasper.compiler.JavaCompiler</code>. (remm) </add> + <add> + Add support for specifying Java 25 (with the value <code>25</code>) as + the compiler source and/or compiler target for JSP compilation. If used + with an Eclipse JDT compiler version that does not support these values, + a warning will be logged and the default will used. + (markt) + </add> </changelog> </subsection> <subsection name="Cluster"> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org