The content of element type "web-app" must match……问题之解决办法
来源:互联网 发布:安卓 软件 推荐 编辑:程序博客网 时间:2024/05/16 08:25
在flex整合java生成的web.xml中添加引用servelet的代码就报错如下:
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*)". eoso/WebRoot/WEB-INF web.xml line 5
添加的代码如下:
<servlet>
<servlet-name>downLoadServlet</servlet-name>
<display-name>downLoadServlet</display-name>
<servlet-class>jp.co.snjp.eos.web.odermanger.service.DownLoad</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>downLoadServlet</servlet-name>
<url-pattern>/download</url-pattern>
</servlet-mapping>
如果把添加的代码删掉,web.xml就正常了,不会显示错误。但是这段代码是flex下载调用服务端的servlet用的,必须添加。说明,网上都是说顺序问题,但我已经按照icon?,display-name?,description?,distributable等等这种顺序添加节点的,但还是错误。后来,我把 <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">这一段校验代码删掉,问题就解决了。原因是:我添加的那部分代码符合xml文档规范,但不符合web-app_2_3.dtd所定义的规范。
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*)". eoso/WebRoot/WEB-INF web.xml line 5
添加的代码如下:
<servlet>
<servlet-name>downLoadServlet</servlet-name>
<display-name>downLoadServlet</display-name>
<servlet-class>jp.co.snjp.eos.web.odermanger.service.DownLoad</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>downLoadServlet</servlet-name>
<url-pattern>/download</url-pattern>
</servlet-mapping>
如果把添加的代码删掉,web.xml就正常了,不会显示错误。但是这段代码是flex下载调用服务端的servlet用的,必须添加。说明,网上都是说顺序问题,但我已经按照icon?,display-name?,description?,distributable等等这种顺序添加节点的,但还是错误。后来,我把 <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">这一段校验代码删掉,问题就解决了。原因是:我添加的那部分代码符合xml文档规范,但不符合web-app_2_3.dtd所定义的规范。
0 0
- The content of element type "web-app" must match……问题之解决办法
- The content of element type "web-app" must match……问题之解决办法
- The content of element type "web-app" must match……问题之解决办法
- The content of element type "web-app" must match……问题之解决办法
- The content of element type "web-app" must match……等 问题之解决办法
- The content of element type "web-app" must match "
- The content of element type "web-app" must match
- xml之解决The content of element type "web-app" must match "(icon?,display......方案
- SpringMVC+idea中web.xml文件的The content of element type "web-app" must match问题
- web.xml配置bug之提示The content of element type "web-app" must match "(icon?,display- name?,description?,
- web.xml配置bug之提示The content of element type "web-app" must match "(icon?,display- name?,description?,
- web.xml The content of element type "web-app" must match "
- web.xml 报错The content of element type "web-app" must match
- web.xml中提示错误The content of element type "web-app" must match
- 解决web.xml 报错The content of element type "web-app" must match
- 解决The content of element type "web-app" must match "(icon?,display
- 解决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?,c
- Android五分钟让你集成底部菜单栏(fragment或者fragment+viewpager)
- 判断一个点是否在圆内(三点确定一个圆)
- selenium testNG jmeter
- MFC对话框程序中的OnCreate和OnInitDialog函数
- Android知识点目录(Updating……)
- The content of element type "web-app" must match……问题之解决办法
- 小技巧:ios启动页面延长时间
- python cookbook:第三章 数字、日期和时间
- 代码的艺术
- 51cto那些技术专题们
- vim配置---重量级插件
- 如何在Android Studio上使用Github
- JavaScript实现分类列表显示与隐藏的切换
- Linux 块大小