I have a legacy application. I am moving from WebSphere to Liferay while working on a Glassfish server.
I got an error while trying to deploy the application to Glassfish:
* org.glassfish.deployment.common.DeploymentException: JSP compilation error: org.apache.jasper.JasperException:
PWC6033: Error compiling Javac for JSP
PWC6199: Servlet generated error: diamond operator is not supported in source 1.5 (use source operator 7 or higher to enable the diamond operator)
PWC6199: Servlet generated error: try-with-resources is not supported in source 1.5 (use source 7 or later to enable try-with-resources)
PWC6199: Servlet Error Generated: Some input files use unverified or unsafe operations.
PWC6199: Servlet generated error: Recompilation with -Xlint: unchecked for details.
- PWC6033: error in compiling Javac for JSP PWC6199: Generated servlet error: diamond operator is not supported in source 1.5 (use operator 7 or higher to enable the diamond operator) *
I added a section to 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 was immediately resolved on my local machine, but not on the test server we are running on. I could not find a specific solution for this anywhere. Please, help:)
source
share