Bri*_*con 34 java eclipse xsd warnings
我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">
Run Code Online (Sandbox Code Playgroud)
但我仍然得到Eclipse(Ganymede)的警告,即没有检测到XML模式,并且没有警告模式违规.我的项目中的其他XML文件(例如Spring Framework配置文件)没有警告,并且确实给出了有关模式违规的正确警告.
如何让架构检查工作,希望警告消失?服务器运行正常.它似乎是一个IDE问题.
mon*_*onj 46
我也讨厌这个警告.特别是因为它出现在XML文件中,你没有写,但出于任何原因出现在你的项目中(如果你使用MAVEN它是地狱).
使用Eclipse 3.5+,您可以轻松删除此验证规则.转到首选项 - > XML - > XML文件 - >验证并选择"忽略".
您可能还需要执行项目 - >清理以使验证警告消失.

too*_*kit 26
也许试试:
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd
Run Code Online (Sandbox Code Playgroud)
代替:
http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd
Run Code Online (Sandbox Code Playgroud)
此外,<!DOCTYPE ...>缺少:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xml>
<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/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5">
<!-- ... -->
</web-app>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
56870 次 |
| 最近记录: |