首页 > 学院 > 开发设计 > 正文

解决web.xml 报错The content of element type "web-app" must match

2019-11-06 08:21:44
字体:
来源:转载
供稿:网友
解决: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 。。。。这段内容

 

ps:最好按照标准顺序排列,删除不是常规方法(适合强迫症看到红叉受不了的银)

 

 

 

 

 

以上内容转自:http://jyao.iteye.com/blog/1263650


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表