I have a legacy application I am moving from WebSphere to Liferay running on a Glassfish server.
I had gotten the error while trying to deploy the application to Glassfish:
*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)
PWC6199: Generated servlet error: try-with-resources is not supported in -source 1.5 (use -source 7 or higher to enable try-with-resources)
PWC6199: Generated servlet error: Some input files use unchecked or unsafe operations.
PWC6199: Generated servlet error: Recompile with -Xlint:unchecked for details.
-- 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)*
I added a section in the glassfish-web.xml:
<jsp-config>
<property name="keepgenerated" value="true">
<description>Keep a copy of the generated servlet class' java code.</description>
</property>
<property name="compilerSourceVM" value="7"/>
<property name="compilerTargetVM" value="7"/>
</jsp-config>
This resolved it immediately on my local machine but not on the Test server we are running. I was not able to see a specific solution for this anywhere. Please Help :)