I\'m trying to use the new Java 7 switch on strings feature.
But Tomcat is not cooperating.
I\'ve made sure that tomcat is running under java 7 but it seems
We are running Tomcat 6 and had the same problem. Our solution was to:
tomcat/lib/ecj-3.3.1.jar with ecj-3.7.2.jar (can be taken from the latest Tomcat 7 release);add this to tomcat/conf/web.xml
...
jsp
org.apache.jasper.servlet.JspServlet
fork
false
xpoweredBy
false
compilerSourceVM
1.7
compilerTargetVM
1.7
3
The simpler alternative is, of course, to install Tomcat 7 but this might not be an option for everyone.