1 . 本人使用的是MyEclipse 2016 ,在新建Java Web项目后,新建Serlvet文件,未作修改,对应的xml文件直接报错。 错误提示为下列语句,xml文件截图如下
Referenced file contains errors (http://java.sun.com/xml/ns/java2ee/web-app_2_5.xsd). For more information, right click on the message in the Problems View and select "Show Details..."
改了半天办法,都没有办法,最后发现,将xml中的xsi:schemaLocation 中的java2ee改为 javaee 保存即可。
<?xml version="1.0" encoding="UTF-8"?> <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/java2ee/web-app_2_5.xsd">
转载请注明原文地址: https://ju.6miu.com/read-666742.html