关闭

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

标签: web.xmljava报错异常解决
1174人阅读 评论(0) 收藏 举报
分类:
解决: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

0
0
查看评论

web.xml中提示错误The content of element type "web-app" must match

The content of element type "web-app" must match "(icon?,display-name?,description?,distributable?,context-param*,filter*,filter-mappin...
  • Goskalrie
  • Goskalrie
  • 2015-11-17 12:14
  • 3999

SpringMVC+idea中web.xml文件的The content of element type "web-app" must match问题

在Spring MVC整合Java生成的web.xml中添加引用servelet的代码就报错如下:The content of element type "web-app" must match "(icon?,display-name?,description?,di...
  • zhoucheng05_13
  • zhoucheng05_13
  • 2016-10-14 15:30
  • 1336

web.xml配置bug之提示The content of element type "web-app" must match "(icon?,display- name?,description?,

转载自:http://www.cnblogs.com/panxuejun/p/6102037.html 错误:配置web.xml时,出现红色叉叉,提示  The content of element type "web-app" must match &...
  • u012377333
  • u012377333
  • 2017-09-13 09:50
  • 706

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

错误:The content of element type "web-app" must match "(icon?,display-   name?,description?,distributable?,context-param*,filter*,f...
  • subuser
  • subuser
  • 2014-03-19 11:23
  • 13892

Hibernate配置文件报错:The content of element type "session-factory" must match "(property*,mapping*,(c

配置hibernate.cfg.xml时提示The content of element type “session-factory” must match “(property*,mapping*,(class-cache| collection-cache),event,listener*)”...
  • FANGAOHUA200
  • FANGAOHUA200
  • 2016-12-18 20:39
  • 1182

Spring 项目 web.xml 出错问题解决方案

web.xml会莫名其妙的报错下面这种错误: Multiple annotations found at this line: - Attribute "xmlns:xsi" must be declared for element type "web-app&quo...
  • mlc1218559742
  • mlc1218559742
  • 2016-10-26 09:31
  • 1503

hibernate:newclass.hbm.xml文件错误(the content of element type "class" must match "(meta*,column*,type?generator?...)

环境:weblogic815+oracle10.2          hibernate3.1 错误:在hibernate.cfg.xml 中配置mapping files后运行,weblogic报其...
  • luolm712
  • luolm712
  • 2009-03-22 16:09
  • 4500

xml之解决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*,fil...
  • zkn_CS_DN_2013
  • zkn_CS_DN_2013
  • 2014-04-14 12:41
  • 1314

关于hibernate中报错”The content of element type "class" must match ......“的一点发现

今天用hibernate测试subclass映射时发现了代码顺序影响程序运行的现象 会报错的代码如下 把配置辨别者列的代码放到其他property之后,例如: <class name="Person" table="PERSONS" discrimin...
  • ningxi520
  • ningxi520
  • 2015-07-25 22:38
  • 1839

struts2框架校验文件配置提示The content of element type "validators" must match "(validator)+".

"-//OpenSymphony Group//XWork Validator Config 1.0//EN"         "http://ww...
  • ssdjdk
  • ssdjdk
  • 2017-04-13 20:24
  • 689
    个人资料
    • 访问:74489次
    • 积分:1457
    • 等级:
    • 排名:千里之外
    • 原创:61篇
    • 转载:3篇
    • 译文:5篇
    • 评论:15条
    欢迎关注


    博客专栏
    技术交流和分享
    工作邮箱:humf@vip.qq.com
    技术分享和交流QQ群:432135803
    微信公众号
    微信公众号
    分享到: 微信 更多
    2