Change GlassFish JSP from 1.5 to higher

ERROR MESSAGE :

org.apache.jasper.JasperException: PWC6033: Error in Javac compilation for JSP

PWC6199: Generated servlet error:
The source value 1.5 is out of date, will delete all the releases of the future

PWC6199: Generated servlet error:
The target value of 1.5 is out of date, will delete all the releases of the future

PWC6199: Generated servlet error:
To hide the obsolete option warning, please use the -Xlint:-options. 

PWC6197: An error occurred at line: 12 in the jsp file: /WEB-INF/jsp/view/viewCart.jsp
PWC6199: Generated servlet error:
-Source 1.5 does not support the diamond operator
  (please use -source version 7 or higher to enable the diamond operator)




Solution

On MAC : go to 
/Users/username/GlassFish_Server/glassfish/domains/domain2/config
open  the default_web.xml file
find the <servlet-name> jsp</servlet-name> 
add
<init-param>
        <param-name>compilerSourceVM</param-name>
        <param-value>1.8</param-value>
</init-param>
<init-param>
        <param-name>compilerTargetVM</param-name>
        <param-value>1.8</param-value>
</init-param>

Commentaires

Posts les plus consultés de ce blog

-Xlint:deprecation | deprecated API | use unchecked or unsafe operations

Caused by: java.time.temporal.UnsupportedTemporalTypeException: Unsupported field: MinuteOfHour

Jasper Raport bug on mac