myeclipse 5.0 新建web project 后 ,web.xml出错

来源:百度知道 编辑:UC知道 时间:2024/06/30 00:52:55
myeclipse 5.0 之前用的还没问题,这两天突然新建web project 后 ,工程上就有个红叉,
提示是web.xml错误
"Referenced file contains errors (http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd).
For more information ,right click on the messege and select show details……"

这是新建的web project 中的web.xml文件
<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">

把所有j2ee改成javaee

应该是数据库连接的问题,把要连接的数据库,提前在本地连接一下应该就好了。

<web-app version=&quo