In my opinion, this has nothing to do with Netbeans, but rather with the application server. It is suspected that you are using Glassfish or Tomcat as they are bundled with Netbeans 7.
I had a problem with Apache Tomcat , and it came down to the fact that Tomcat (the Apache Jasper library) uses Java 1.6 to compile JSP by default . You will have to change the default configuration for the JSP servlet in web.xml
. I added the following lines to the web.xml
application, note two parameters compilerSourceVM and compilerTargetVM :
<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> <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> <load-on-startup>3</load-on-startup> </servlet> <servlet-mapping> <servlet-name>jsp</servlet-name> <url-pattern>*.jsp</url-pattern> <url-pattern>*.jspx</url-pattern> </servlet-mapping>
source share