I installed the DXA 1.2 JAVA web application on Tomcat with the Create-web-application-staging.bat script. Most of the site works, but the header cannot be rendered and shows an error message (see screenshot).

enter image description here

The logs tell me that something is wrong in the language selector.

2016-01-07 17:05:04,023 ERROR EntitiesTag - Error while processing entity tag
org.apache.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: 17 in the jsp file: /WEB-INF/Views/Core/Entity/LanguageSelector.jsp
'<>' operator is not allowed for source level below 1.7

complete log...

I am running Java 1.7 and I know that DXA is compiled for at least 1.7. The problem is in a Tomcat or JSP setting which compiles the .jsp to JAVA 1.6 profile.

How do I get Tomcat to compile this normally?

2 Answers 2


Add those lines to JSP servlet settings in Apache's Tomcat 7.0\conf\web.xml.



Also see https://stackoverflow.com/a/11810014/1678525 and https://tomcat.apache.org/tomcat-7.0-doc/jasper-howto.html

  • had been a victim & i was also wondering why does it say that i am using something below 1.7 when i was not.You should mark it as answer
    – Ashutosh
    Commented Jan 8, 2016 at 4:26

You're probably using Tomcat 7, which by default doesn't allow Java 1.7-specific stuff like diamond syntax. It can be configured to allow it, though: http://censore.blogspot.nl/2015/04/how-to-set-tomcat-7-source-level-to.html

  • I came to the same conclusion 2 mintues earlier ;)
    – Jan H
    Commented Jan 7, 2016 at 19:12
  • 1
    I do use Tomcat 7 indeed, this is the latest Tomcat version supported by SDL Tridion 2013 SP1.
    – Jan H
    Commented Jan 7, 2016 at 19:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.