今天在学习JavaScript数据类型转换的时候,遇到了一些问题,虽然觉得是些小问题,但还是决定把它记下来,防止以后再犯。
1.The server does not support version 3.0 of the J2EE Web module specification
今天用Eclipse部署一个Web项目Test,报如下错误:The server does not support version3.0 of the J2EE Web module specification
原来创建Test时用的是Tomcat 6.0,jdk都是用的1.6
Tomcat 6.0最多支持Servlet 2.5
解决如下:
在项目根目录下有一个.settings的文件夹,该文件夹下有一个org.eclipse.wst.common.project.facet.core.xml文件,内容如下:
?
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
? <fixed facet="jst.web"/>
? <fixed facet="wst.jsdt.web"/>
? <fixed facet="java"/>
? <installed facet="java" version="1.5"/>
? <installed facet="jst.web" version="3.0"/>
? <installed facet="wst.jsdt.web" version="1.0"/>
</faceted-project>
? 把<installed facet="jst.web" version="3.0"/>改为? <installed facet="jst.web" version="2.5"/>
?
?2.在解决完上述问题时,又在web.xml中出现cvc-complex-type.4: Attribute 'version' must appear on element 'web-app'.的错误。
解决办法:
此时只需在<web-app 后面添加你改的版本号,比如我的改成了2.5,就添加version="2.5"。