1. 程式人生 > >解決:The content of element type "web-app" must match "(icon?display

解決:The content of element type "web-app" must match "(icon?display

內容 param match filter res ros welcome local page

http://www.educity.cn/wenda/126463.html

解決:The content of element type "web-app" must match "(icon ,display-

  錯誤:The content of element type "web-app" must match "(icon ,display-
name ,description ,distributable ,context-param*,filter*,filter-mapping*,listener*,servlet*,servlet-
mapping*,session-config ,mime-mapping*,welcome-file-list ,error-page*,taglib*,resource-env-
ref*,resource-ref*,security-constraint*,login-config ,security-role*,env-entry*,ejb-ref*,ejb-local-ref*)".
- No grammar constraints (DTD or XML schema) detected for the document.

  web.xml頭部配置:

  < xml version="1.0" encoding="UTF-8" >
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "">
<web-app>

  原因:文檔內容標簽順序不符合web-app_2_3.dtd規範

  解決方案

  1:嚴格按照提示上的順序排列

  2:刪除<!DOCTYPE 。。。。這段內容

解決:The content of element type "web-app" must match "(icon?display