I have the following error for compiling a jsp file:
\'<>\' operator is not allowed for source level below 1.7
I\'m using
So the only way it seems now is that your application server, eg tomcat is configured for jdk version lower than 1.7. check what version of java is being pointed by JAVA_HOME environment variable on your system.If you correct that, it should solve your problem.
Check the following areas within Eclipse:
Right Click Project > Properties > Project Facets > Java > Version 1.7
Right Click Project > Properties > Java Build Path > Libraries > JRE Library should be 1.7
Right Click Project > Properties > Java Compiler > Compiler compliance level
Window > Preferences > Server > Runtime Environment > Select the Server > Edit > Ensure JRE is set to 1.7
I know it's been over 2 years since this thread was last active but in case someone is looking for an answer and the above checks don't solve it: it's because the compiler that your tomcat is running is older than 1.7. One way to solve this is to add this to tomcat/conf/web.xml:
<servlet>
<servlet-name>jsp</servlet-name>
<servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
<init-param>
<param-name>fork</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>xpoweredBy</param-name>
<param-value>false</param-value>
</init-param>
<init-param> <!-- this should be added -->
<param-name>compilerSourceVM</param-name>
<param-value>1.7</param-value>
</init-param>
<init-param>
<param-name>compilerTargetVM</param-name>
<param-value>1.7</param-value>
</init-param> <!-- last added line -->
<load-on-startup>3</load-on-startup>
</servlet>
Source