The content of element type "struts" must match "((package|include|bean|constant)*,unknown-handler-s
阿新 • • 發佈:2019-01-02
錯誤資訊 The content of element type "struts" must match "((package|include|bean|constant)*,unknown-handler-stack?)".
我在做Spring整合Struts的時候,struts.xml檔案就一直報這個錯誤
錯誤程式碼
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
<contant name="struts.action.extension" value="do,actio,kk"></contant>
<package name="tjn" extends="struts-default">
<action name="person_save" class="personService" method="save">
<result name="success">/success.jsp</result>
</action>
</package>
</struts>
正確程式碼如下
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">
<struts>
<constant name="struts.action.extension" value="do,actio,kk"></constant>
<package name="tjn" extends="struts-default">
<action name="person_save" class="personService" method="save">
<result name="success">/success.jsp</result>
</action>
</package>
</struts>