On 02/10/17 21:35, Konstantin Kolinko wrote: > 2017-10-02 23:12 GMT+03:00 Mark Thomas <ma...@apache.org>: >> Hi, >> >> We have a problem with Java 9 support for JSPs with Tomcat 7. >> >> The latest version of the ECJ compiler we can ship with Tomcat 7 is >> 4.4.2 since that is the latest version that supports Java 6 and Tomcat 7 >> is required (by the specs) to run on Java 6. >> >> The earliest version of the ECJ compiler that supports Java 9 is 4.5. >> >> Hence, we can't support Java 9 for JSPs and be spec compliant for Tomcat 7. >> >> >> My current thinking is that we simply hard code the necessary constants > > +1. Those constants are just strings. > We already hardcoded them for Tomcat 6 and Java 8: > > https://svn.apache.org/viewvc/tomcat/archive/tc6.0.x/trunk/java/org/apache/jasper/compiler/JDTCompiler.java?revision=1803960&view=markup#l323 > > >> to configure ECJ for Java 9 into Tomcat 7 so it will work if the user: >> a) replaces the ECJ JAR that ships with Tomcat 7 with a more recent >> version; and >> b) configures Jasper for Java 9 >> >> We could also try and catch if Jasper is configured for 1.9 but ECJ >> doesn't support it. >> >> >> Thoughts? > > I hope that ECJ 4.4.2 can work when running on Java 9. (If it cannot > at all - I'wouldn't be surprised - then more intrusive steps will be > needed).
Based on a simple test with the ROOT web app ECJ 4.4.2 does work when running on Java 9. > A possibility is to provide separate downloads "for java 9" - like we > do with different versions of TC-Native for Windows. > > Or have a separate download "for java 6, java 7" and ship ECJ 4.7.1 > with the default one. > (I suspect that 4.7 runs on Java 8+, though I have not tested). > > Let's start with an easy solution first (string constants + drop-in > replacement by an user). This works. At least Jasper produces class files with a version number of 53 which is the expected value for Java 9. I'll go ahead and commit this shortly. Mark --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org