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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content