web.xml错误
<?xml version="1.0" encoding="UTF-8"?>
<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://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
findbug运行后 报以下错误:
1)Description Resource Path Location Type Error - schema_reference.4: Failed to read schema document 'http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>. web.xml ETP/WebContent/WEB-INF line 1 XML Auto-Validate
2)Description Resource Path Location Type Error - cvc-elt.1: Cannot find the declaration of element 'web-app'. web.xml ETP/WebContent/WEB-INF line 5 XML Auto-Validate
<?xml version="1.0" encoding="UTF-8"?>
<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://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
findbug运行后 报以下错误:
1)Description Resource Path Location Type Error - schema_reference.4: Failed to read schema document 'http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>. web.xml ETP/WebContent/WEB-INF line 1 XML Auto-Validate
2)Description Resource Path Location Type Error - cvc-elt.1: Cannot find the declaration of element 'web-app'. web.xml ETP/WebContent/WEB-INF line 5 XML Auto-Validate
解决方案 »
- java用户名校验
- org.springframework.web.context.support.XmlWebApplicationContext
- sqlserver2005插入数据 jsp页面中文显示为“???”
- 字符串问题
- apache tomcat 整合后怎么可以访问struts2呢
- tomcat中文参数乱码问题
- 在eclipse上写的html 和JSP的中文字符输出时全是乱码怎么办
- 复合主键更新问题,在线等
- 请大家推荐一下学习j2ee的书好吗?
- 关于分布式计算的几个基本问题的思考,欢迎批评
- 谁有effective java 中文第二版的电子书吗
- 请教spring2.5 mvc中 关于注解的用法
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
换这个试试
那个错误错误是因为没有找到合适的dtd文件。实际上没关系,可以正常启动。
或者去官网看看。
一般来说,dtd文件都应该是cache到本地的。直接输入:http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd这样的url,应该是可以得到文件的。
findBug怎么查找本地路径中的dtd,如何认定错误,我不太明白。