天天看点

springMVC的web.xml配置文件提示错误

错误信息为:

  1.  Attribute "xmlns:xsi" must be declared for element type "web-app".  
  2.     - Attribute "xsi:schemaLocation" must be declared for element type "web-app".
  3. Attribute "version" must be declared for element type "web-app".  
  4.     - Attribute "xmlns" must be declared for element type "web-app". 

 解决:原因是<web-app>必须要放在首行,前面不要有注释,如果有删掉,之后按Ctrl+S保存,就没有错误了。