org.apache.jasper.JasperException: PWC6033: Error in Javac compilation for JSP
PWC6197: An error occurred at line: 4 in the jsp file: /index.jspPWC6199: Generated servlet error:strings in switch are not supported in -source 1.5 (use -source 7 or higher to enable strings in switch)
The fix is quite simple. You must include a
glassfish-web.xml
file in your project, and set a couple of properties. compilerSourceVM
and compilerTargetVM
.Please see the example below for a complete configuration.
The project will now compile and use JDK7.
That's a really neat fix John. This is one of the most common errors I have come across while trying to use JDK7 with JSP code. Thanks a lot.
ReplyDelete