我的文件顶部web.xml
如下所示:
<?xml version="1.0" encoding="UTF-8"?>
<web-app 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://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd"
version="2.5">
但是我仍然收到来自 Eclipse (Ganymede) 的警告,即没有检测到 XML 模式,并且没有警告模式违规。我的项目中的其他 XML 文件(例如Spring Framework配置文件)没有警告,并且确实给出了有关架构违规的正确警告。
如何使架构检查正常工作并希望警告消失?服务器运行正常。它似乎只是一个IDE问题。