Search code examples
javajakarta-eeglassfishglassfish-3

Changing JSP compiler version in glassfish


I am pre-compiling my JSP pages on deploy but keep getting these error:

 Caused by: org.glassfish.deployment.common.DeploymentException: JSP
 Compilation Error: org.apache.jasper.JasperException: PWC6033: Error
 in Javac compilation for JSP

 PWC6199: Generated servlet error: diamond operator is not supported in
-source 1.5   (use -source 7 or higher to enable diamond operator

Does anyone know how to change the compiler version and or settings to resolve this? I have already instructed glassfish to use JDK7 as java home like this;

asadmin set "server.java-config.java-home=/usr/java/jdk1.7.0_09"

But this does not work either.


Solution

  • Pre-build the JSP page using Maven or Ant plugging i.e jspc-maven-plugin. Not only do you get the benefit of debugging issue at build and staging phase, but you also get the speed of deployment and and elimination of frustration.