Index: apache-tomcat-11.0.6-src/java/org/apache/jasper/compiler/JDTCompiler.java
===================================================================
--- apache-tomcat-11.0.6-src.orig/java/org/apache/jasper/compiler/JDTCompiler.java
+++ apache-tomcat-11.0.6-src/java/org/apache/jasper/compiler/JDTCompiler.java
@@ -310,21 +310,21 @@ public class JDTCompiler extends org.apa
             } else if (opt.equals("15")) {
                 settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_15);
             } else if (opt.equals("16")) {
-                settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_16);
+                settings.put(CompilerOptions.OPTION_Source, "16");
             } else if (opt.equals("17")) {
-                settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_17);
+                settings.put(CompilerOptions.OPTION_Source, "17");
             } else if (opt.equals("18")) {
-                settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_18);
+                settings.put(CompilerOptions.OPTION_Source, "18");
             } else if (opt.equals("19")) {
-                settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_19);
+                settings.put(CompilerOptions.OPTION_Source, "19");
             } else if (opt.equals("20")) {
-                settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_20);
+                settings.put(CompilerOptions.OPTION_Source, "20");
             } else if (opt.equals("21")) {
-                settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_21);
+                settings.put(CompilerOptions.OPTION_Source, "21");
             } else if (opt.equals("22")) {
-                settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_22);
+                settings.put(CompilerOptions.OPTION_Source, "22");
             } else if (opt.equals("23")) {
-                settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_23);
+                settings.put(CompilerOptions.OPTION_Source, "23");
             } else if (opt.equals("24")) {
                 // Constant not available in latest ECJ version shipped with
                 // Tomcat. May be supported in a snapshot build.
@@ -337,11 +337,11 @@ public class JDTCompiler extends org.apa
                 settings.put(CompilerOptions.OPTION_Source, "25");
             } else {
                 log.warn(Localizer.getMessage("jsp.warning.unknown.sourceVM", opt));
-                settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_17);
+                settings.put(CompilerOptions.OPTION_Source, "17");
             }
         } else {
             // Default to 17
-            settings.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_17);
+            settings.put(CompilerOptions.OPTION_Source, "17");
         }
 
         // Target JVM
@@ -391,29 +391,29 @@ public class JDTCompiler extends org.apa
                 settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_15);
                 settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_15);
             } else if (opt.equals("16")) {
-                settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_16);
-                settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_16);
+                settings.put(CompilerOptions.OPTION_TargetPlatform, "16");
+                settings.put(CompilerOptions.OPTION_Compliance, "16");
             } else if (opt.equals("17")) {
-                settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_17);
-                settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_17);
+                settings.put(CompilerOptions.OPTION_TargetPlatform, "17");
+                settings.put(CompilerOptions.OPTION_Compliance, "17");
             } else if (opt.equals("18")) {
-                settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_18);
-                settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_18);
+                settings.put(CompilerOptions.OPTION_TargetPlatform, "18");
+                settings.put(CompilerOptions.OPTION_Compliance, "18");
             } else if (opt.equals("19")) {
-                settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_19);
-                settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_19);
+                settings.put(CompilerOptions.OPTION_TargetPlatform, "19");
+                settings.put(CompilerOptions.OPTION_Compliance, "19");
             } else if (opt.equals("20")) {
-                settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_20);
-                settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_20);
+                settings.put(CompilerOptions.OPTION_TargetPlatform, "20");
+                settings.put(CompilerOptions.OPTION_Compliance, "20");
             } else if (opt.equals("21")) {
-                settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_21);
-                settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_21);
+                settings.put(CompilerOptions.OPTION_TargetPlatform, "21");
+                settings.put(CompilerOptions.OPTION_Compliance, "21");
             } else if (opt.equals("22")) {
-                settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_22);
-                settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_22);
+                settings.put(CompilerOptions.OPTION_TargetPlatform, "22");
+                settings.put(CompilerOptions.OPTION_Compliance, "22");
             } else if (opt.equals("23")) {
-                settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_23);
-                settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_23);
+                settings.put(CompilerOptions.OPTION_TargetPlatform, "23");
+                settings.put(CompilerOptions.OPTION_Compliance, "23");
             } else if (opt.equals("24")) {
                 // Constant not available in latest ECJ version shipped with
                 // Tomcat. May be supported in a snapshot build.
@@ -428,12 +428,12 @@ public class JDTCompiler extends org.apa
                 settings.put(CompilerOptions.OPTION_Compliance, "25");
             } else {
                 log.warn(Localizer.getMessage("jsp.warning.unknown.targetVM", opt));
-                settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_17);
+                settings.put(CompilerOptions.OPTION_TargetPlatform, "17");
             }
         } else {
             // Default to 17
-            settings.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_17);
-            settings.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_17);
+            settings.put(CompilerOptions.OPTION_TargetPlatform, "17");
+            settings.put(CompilerOptions.OPTION_Compliance, "17");
         }
 
         final IProblemFactory problemFactory = new DefaultProblemFactory(Locale.getDefault());
