This is an automated email from the ASF dual-hosted git repository.
markt-asf pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new 1bf5917b3b Add Java 28 support for JSP compilation (if JDT supports it)
1bf5917b3b is described below
commit 1bf5917b3b0b583b5372df2c1f76b7ef713bbe33
Author: Mark Thomas <[email protected]>
AuthorDate: Wed Jul 1 14:33:09 2026 +0100
Add Java 28 support for JSP compilation (if JDT supports it)
---
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 f5d5485729..1f6386b665 100644
--- a/java/org/apache/jasper/compiler/JDTCompiler.java
+++ b/java/org/apache/jasper/compiler/JDTCompiler.java
@@ -379,6 +379,11 @@ public class JDTCompiler extends
org.apache.jasper.compiler.Compiler {
// May be supported in a snapshot build.
// This is checked against the actual version below.
settings.put(CompilerOptions.OPTION_Source, "27");
+ } else if (opt.equals("28")) {
+ // 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, "28");
} else {
log.warn(Localizer.getMessage("jsp.warning.unknown.sourceVM",
opt));
settings.put(CompilerOptions.OPTION_Source,
CompilerOptions.VERSION_1_8);
@@ -503,6 +508,12 @@ public class JDTCompiler extends
org.apache.jasper.compiler.Compiler {
// This is checked against the actual version below.
settings.put(CompilerOptions.OPTION_TargetPlatform, "27");
settings.put(CompilerOptions.OPTION_Compliance, "27");
+ } else if (opt.equals("28")) {
+ // 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, "28");
+ settings.put(CompilerOptions.OPTION_Compliance, "28");
} else {
log.warn(Localizer.getMessage("jsp.warning.unknown.targetVM",
opt));
settings.put(CompilerOptions.OPTION_TargetPlatform,
CompilerOptions.VERSION_1_8);
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index a3364a7457..bc0b133737 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -179,6 +179,13 @@
<fix>
<bug>70135</bug>: Fix security classload regression. (remm)
</fix>
+ <add>
+ Add support for specifying Java 28 (with the value <code>28</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 be used.
+ (markt)
+ </add>
</changelog>
</subsection>
<subsection name="WebSocket">
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]