The content of element type "struts" must match "(package|include|bean|constant)*".

一、出现问题


The content of element type "struts" must match "(package|include|bean|constant)*".


二、问题原因


The content of element type "struts" must match "(package|include|bean|constant)*".


三、解决方案


    出现该错误说明xml不符合dtd规范,提示信息已经给出来了,它的意思是struts下的子节点只能是package、include、bean或者constant。

  而我struts标签下却有<action/>,所以报错。

  解决办法是将<action/>标签移到package的子节点中,OK,问题解决了!


The content of element type "struts" must match "(package|include|bean|constant)*".


四、学习心得


1、办法总比困难多,只要静下心来,一切都不是问题。

2、捋清楚了就简单了。