Resource specification not allowed here for source level below 1.7
来源:互联网 发布:阿里巴巴网络销售 编辑:程序博客网 时间:2024/05/20 14:16
Resource specification not allowed here for source level below 1.7
现象:tomcat能正常启动,但打开页面时,出现上面的错误。
原因:就是jsp编译的版本不对。
因为tomcat7默认jsp的编译级别为1.6。参见:Jasper 2 JSP Engine How To
解决方法:
修改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> <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>
重启后生效。
参考:How to set Tomcat 7 source level to Java 7
0 0
- Resource specification not allowed here for source level below 1.7
- Resource specification not allowed here for source level below 1.7
- '<>' operator is not allowed for source level below 1.7
- <>' operator is not allowed for source level below 1.7
- '<>' operator is not allowed for source level below 1.7
- '<>' operator is not allowed for source level below 1.7
- operator is not allowed for source level below 1.7
- '<>' operator is not allowed for source level below 1.7
- '<>' operator is not allowed for source level below 1.7
- '<>' operator is not allowed for source level below 1.7
- '<>' operator is not allowed for source level below 1.7
- eclipse报错:'<>' operator is not allowed for source level below 1.7
- idea javaweb项目 jsp页面报错:'<>'operator is not allowed for source level below 1.7
- operator is not allowed for source level below 17 and Android requires compiler compliance level 5.0
- column not allowed here
- Cannot switch on a value of type String for source level below 1.7. Only convertible int values or e
- magento:DirectoryIndex not allowed here
- ORA-02287: sequence number not allowed here
- Hadoop YARN中内存和CPU两种资源的调度和隔离
- 字符设备框架(ioctrl)
- Linux系统日志及日志分析
- PHP基础笔记(03)
- 关于 timeIntervalSince1970 计算出错的问题(4s)
- Resource specification not allowed here for source level below 1.7
- js 的一些总结
- 阿里云 Centos 7安装PHP7 配置LNMP
- 欢迎使用CSDN-markdown编辑器
- [2016/06/03] OpenGL在VS2012中的配置
- #49 – Unhandled Exceptions(未处理的异常)
- 仿QQ左边侧滑+手势 (github下载源码)
- 基于 Python 和 Scikit-Learn 的机器学习介绍
- svn 命令大全