JSP fails to compile because '<>' operator is not allowed for source level below 1.7

Solution Verified - Updated -

Issue

  • We have a JSP that fails to compile with the following exception:
JBWEB000236: Servlet.service() for servlet jsp threw exception: org.apache.jasper.JasperException: JBWEB004062: Unable to compile class for JSP:

JBWEB004060: An error occurred at line: 5 in the jsp file: /WEB-INF/pagecomponents/menu.jsp
'<>' operator is not allowed for source level below 1.7

Environment

  • JBoss Enterprise Application Platform (EAP) 6

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.