转自:http://eric-yan.iteye.com/blog/1908470

 

问题描述:

web项目web.xml编译错误:

schema_reference.4: Failed to read schema document 'http://java.sun.com/xml/ns/j2ee/web-app_2_5.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>.

 

解决方案:

多方查找,终不得解决,最后,format了一下格式,问题得以解决。

 

compile error format:

<web-app xmlns:xsi="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">
no error format:  
  
<web-app version="2.5" xmlns:xsi="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">  

 

 

 

相关文章:

  • 2021-08-17
  • 2021-11-24
  • 2021-06-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-09
猜你喜欢
  • 2021-09-30
  • 2022-12-23
  • 2022-12-23
  • 2021-07-20
相关资源
相似解决方案