I'm using Tomcat's Jasper JSP engine via an embedded Jetty environment.
I've recently updated this process to run on OpenJDK 10, but I found that Java 10 features weren't available in JSP scriptlet syntax. I had not paid much attention to how Jasper was compiling JSPs, but when I dug into it, I learned that instead of delegating to the platform JDK compiler, it's defaulting to JDT/ECJ under the hood which at the version Jasper is using doesn't have Java 10 support yet. The latest `compilerSourceVM` and `compilerTargetVM` option supported is "1.9".
Technically, I can (did) inject my own compiler implementation via the `compilerClassName` parameter and delegate to something like `ToolProvider.getSystemJavaCompiler()`, but IDEA still marks `var s = "";` as an error because it's JSP editor is internally based on Jasper, and I can only override the runtime, not the IDE. (It also seems to be a bit slower than the Eclipse compiler at runtime.)
Acknowledging that just because I can doesn't mean I should and that scriptlets or JSP itself are not much in vogue (to put it nicely) and that the EE process is in the middle of reinventing itself, I'm still interested in what to expect (if anything) about this issue on Tomcat/Jasper's roadmap. I've found past issues about adding Java 8 support, but nothing yet about Java 10 (or later). I'd still have to wait for Jetty and IDEA to pull in an update so it's not going to happen soon regardless, and this is mainly to satisfy my own curiosity.
1. Is the Java version supported by JSP something that's tracking a spec and has to wait for the spec to advance before it will be added?
2. With Java "moving forward faster", is there a realistic motivation for JSP implementations to integrate upstream compiler advances more quickly?
3. Is Tomcat's update of ECJ dependent on the Eclipse release train? Is it worth logging this somewhere?