Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 756
Bitmap Avatar asked Jan 14 '23 10:01

Bitmap


1 Answers

You need to set the compilerSourceVM and compilerTargetVM properties of jsp-config correctly for this to work. Look here for more details.

like image 143
Aravind Yarram Avatar answered Jan 21 '23 22:01

Aravind Yarram