The content of element type "struts-config" must match "(display-name?,descr
2012-11-15 08:55
573 查看
配置struts-config.xml 时,出了异常信息:
解决办法:
struts-config.xml 中的元素顺序有严格的要求,它们的位置不能错位,不然就会报错.
注意:
struts-config.xml必须按照 display-name --> description --> form-beans --> global-exceptions --> global-forwards --> action-mappings --> controller --> message-resources --> plug-in 的顺序书写 .
The content of element type "struts-config" must match "(display-name?,description?,form-beans?,global-exceptions?,global-forwards?,action-mappings?,controller?,message-resources*,plug-in*)".
解决办法:
struts-config.xml 中的元素顺序有严格的要求,它们的位置不能错位,不然就会报错.
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.3//EN" "http://struts.apache.org/dtds/struts-config_1_3.dtd"> <struts-config> <form-beans> </form-beans> <global-exceptions> </global-exceptions> <global-forwards> </global-forwards> <action-mappings> <action path="/index" type="org.apache.struts.actions.ForwardAction" parameter="index-tiles"></action> </action-mappings> <controller> <set-property property="processorClass" value="org.apache.struts.tiles.TilesRequestProcessor"/> </controller> <message-resources parameter="com.test.struts.ApplicationResources" /> <plug-in className="org.apache.struts.tiles.TilesPlugin"> <set-property value="/WEB-INF/tiles/tiles-defs.xml" property="definitions-config"></set-property> </plug-in> </struts-config>
注意:
struts-config.xml必须按照 display-name --> description --> form-beans --> global-exceptions --> global-forwards --> action-mappings --> controller --> message-resources --> plug-in 的顺序书写 .
相关文章推荐
- The content of element type "struts-config" must match "(display-name?,description?,data-sources?,fo
- The content of element type "struts-config" must match "(display-name?,descripti .
- arse Error at line 58 column 17: The content of element type "struts-config" must match "(display-na
- The content of element type "web-app" must match "(icon?,display-name?,description?,distributable?,c
- web.xml配置bug之提示The content of element type "web-app" must match "(icon?,display- name?,description?,
- The content of element type "struts-config" must match "(data-sources?,form-
- The content of element type "web-app" must match "(icon?,display- name?,description?...)
- The content of element type "web-app" must match "(icon?,display-name?,description?,distributable?,c
- The content of element type "web-app" must match "(icon?,display-name?,description?,distributable?,c
- web.xml配置bug之提示The content of element type "web-app" must match "(icon?,display- name?,description?,distributable?,
- 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?
- 完全解决struts启动时报错:The content of element type "struts-config" must match "(data-sources?,form-beans?,global-exceptions?,global-for
- Java大牛养成记(5)——The content of element type "struts" must match "(package|include|bean|constant)*".
- 解决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 "struts" must match "(package|include|bean|constant)*".
- xml之解决The content of element type "web-app" must match "(icon?,display......方案
- The content of element type "struts" must match "((package|include|bean|constant)*,unknown-handler-s
- The content of element type "sqlMapConfig" is incomplete, it must match "(properties?,settings?,resu