I installed Tomcat 5.0.28 on W2K box. During installation I provided path to j2sdk 5.0 beta 3 build 60, therefore tools.jar has been taken from this particular distro. After that I had been forced to switch JVM to IBM's 1.4.1 (WebSphere 5.1 AppClient). Tomcat starts with no problem, however, Jasper compiles JSP with javac from tools.jar (jvm 5.0 compliant) and makes compiled classes unusable for the 1.4.1 jvm. The simplest workaround is to overwrite tools.jar with the one that comes with the jdk that tomcat is run on. However, the simple solution is to provide the "target" parameter to JspServlet and pass it along to ant javac compiler. ...Yes, I know we're going to get rid of ant compiler... ;) BTW, I wonder which version of classes JDT will produce. Maybe this also should be up to the user to decide?
OK, added compilerTargetVM option to JspServlet and JspC.
Based on mu recent experience, javac params source and target are interrelated. For example, the default source version for the 5.0 RC b63 is 1.5 which implies 1.5 as a target. For example using ant 1.6.2 on j2sdk1.5 (hell, cannot get used to switching to 5.0, either can Sun, I suppose ;) the following <javac target="1.4" ... /> results in: [javac] javac: target release 1.4 conflicts with default source release 1.5 Providing source attribute to ant's javac task forces compiler to downgrade to 1.4 sources. <javac target="1.4" source="1.4" ... /> I'd be more than delighted if you could also provide the source parameter in the same manner as you have done with the compilerTargetVM. BTW, I have no idea if this also affects JDT.
We're waiting for your patches :)
Yes, this also affects JDT. And please do NOT reopen one issue to ask for something else to be done, even if it's related.
The reason why I reopened was the fact that the solution you provided *partially* works. What I wanted to point out is the fact that the "target" parameter alone seems not to be sufficient. Sorry for reopening but I still consider adding "source" parameter is essential for this very enhancement to be fully functional. My bad I haven't indicated it in my initial submission.