Tomcat 8.0.15 Release Notes wrote:
Tomcat 8.0 is designed to run on Java SE 7 and later.
It does not when it comes to JSP pages. Try to use closures in a JSP page
The exception will follow as bellow.
type Exception report
message Unable to compile class for JSP:
description The server encountered an internal error that prevented it from fulfilling this request.
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 131 in the jsp file: /inventory.jsp
Lambda expressions are allowed only at source level 1.8 or above
131: Collections.sort(selectedLines, (String o1, String o2)->f.parse(o1.split(",")).compareTo(f.parse(o2.split(","))));
133: //Collections.sort(selectedLines, new StringDateComparator());
134: DateFormat formatterCsv1 = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss SSS");