You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2024/01/04 15:25:25 UTC
(tomcat) 02/04: Update default Java version used by Jasper to 21
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 4ebfa866d3afb2e9f86f60321850cdefe790bdb0
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Thu Jan 4 15:14:49 2024 +0000
Update default Java version used by Jasper to 21
---
conf/web.xml | 4 ++--
java/org/apache/jasper/EmbeddedServletOptions.java | 4 ++--
java/org/apache/jasper/JspC.java | 4 ++--
java/org/apache/jasper/compiler/JDTCompiler.java | 14 +++++++-------
webapps/docs/changelog.xml | 9 +++++++++
webapps/docs/jasper-howto.xml | 4 ++--
6 files changed, 24 insertions(+), 15 deletions(-)
diff --git a/conf/web.xml b/conf/web.xml
index fc79046e3f..0a1261e3b3 100644
--- a/conf/web.xml
+++ b/conf/web.xml
@@ -160,9 +160,9 @@
<!-- pages. See the jasper documentation for more -->
<!-- information. -->
<!-- -->
- <!-- compilerSourceVM Compiler source VM. [11] -->
+ <!-- compilerSourceVM Compiler source VM. [21] -->
<!-- -->
- <!-- compilerTargetVM Compiler target VM. [11] -->
+ <!-- compilerTargetVM Compiler target VM. [21] -->
<!-- -->
<!-- development Is Jasper used in development mode? If true, -->
<!-- the frequency at which JSPs are checked for -->
diff --git a/java/org/apache/jasper/EmbeddedServletOptions.java b/java/org/apache/jasper/EmbeddedServletOptions.java
index 33156864f2..81df0af31a 100644
--- a/java/org/apache/jasper/EmbeddedServletOptions.java
+++ b/java/org/apache/jasper/EmbeddedServletOptions.java
@@ -124,12 +124,12 @@ public final class EmbeddedServletOptions implements Options {
/**
* Compiler target VM.
*/
- private String compilerTargetVM = "11";
+ private String compilerTargetVM = "21";
/**
* The compiler source VM.
*/
- private String compilerSourceVM = "11";
+ private String compilerSourceVM = "21";
/**
* The compiler class name.
diff --git a/java/org/apache/jasper/JspC.java b/java/org/apache/jasper/JspC.java
index 727a56e7a9..f6b981e01d 100644
--- a/java/org/apache/jasper/JspC.java
+++ b/java/org/apache/jasper/JspC.java
@@ -197,8 +197,8 @@ public class JspC extends Task implements Options {
protected String compiler = null;
- protected String compilerTargetVM = "11";
- protected String compilerSourceVM = "11";
+ protected String compilerTargetVM = "21";
+ protected String compilerSourceVM = "21";
protected boolean classDebugInfo = true;
diff --git a/java/org/apache/jasper/compiler/JDTCompiler.java b/java/org/apache/jasper/compiler/JDTCompiler.java
index 8d7535d60f..e4a4f659bd 100644
--- a/java/org/apache/jasper/compiler/JDTCompiler.java
+++ b/java/org/apache/jasper/compiler/JDTCompiler.java
@@ -328,11 +328,11 @@ public class JDTCompiler extends org.apache.jasper.compiler.Compiler {
settings.put(CompilerOptions.OPTION_Source, "22");
} else {
log.warn(Localizer.getMessage("jsp.warning.unknown.sourceVM", opt));
- settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_11);
+ settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_21);
}
} else {
- // Default to 11
- settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_11);
+ // Default to 21
+ settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_21);
}
// Target JVM
@@ -407,12 +407,12 @@ public class JDTCompiler extends org.apache.jasper.compiler.Compiler {
settings.put(CompilerOptions.OPTION_Compliance, "22");
} else {
log.warn(Localizer.getMessage("jsp.warning.unknown.targetVM", opt));
- settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_11);
+ settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_21);
}
} else {
- // Default to 11
- settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_11);
- settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_11);
+ // Default to 21
+ settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_21);
+ settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_21);
}
final IProblemFactory problemFactory = new DefaultProblemFactory(Locale.getDefault());
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 1e2f1f7a3b..b440511ffe 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -150,6 +150,15 @@
</add>
</changelog>
</subsection>
+ <subsection name="Jasper">
+ <changelog>
+ <update>
+ The defaults for <code>compilerSourceVM</code> and
+ <code>compilerTargetVM</code> have been updated to 21 to align with Java
+ 21 being the minimum Java version required for Tomcat 11. (markt)
+ </update>
+ </changelog>
+ </subsection>
<subsection name="Web Applications">
<changelog>
<fix>
diff --git a/webapps/docs/jasper-howto.xml b/webapps/docs/jasper-howto.xml
index 516a89275f..31b49ce50a 100644
--- a/webapps/docs/jasper-howto.xml
+++ b/webapps/docs/jasper-howto.xml
@@ -106,10 +106,10 @@ set then <code>setenv.[sh|bat]</code> should be used to add
to the <code>CLASSPATH</code> environment variable.</li>
<li><strong>compilerSourceVM</strong> - What JDK version are the source files
-compatible with? (Default value: <code>11</code>)</li>
+compatible with? (Default value: <code>21</code>)</li>
<li><strong>compilerTargetVM</strong> - What JDK version are the generated files
-compatible with? (Default value: <code>11</code>)</li>
+compatible with? (Default value: <code>21</code>)</li>
<li><strong>development</strong> - Is Jasper used in development mode? If true,
the frequency at which JSPs are checked for modification may be specified via
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org