错误
“包”元素类型的内容必须匹配“(结果类型?,拦截器?,默认拦截器引用?,默认动作引用?,默认类引用?,全局结果?,全局? -exception-mappings?,action *)“
struts.xml
<struts>
<constant name="struts.custom.i18n.resources" value="ApplicationResources, MessageResources, global" />
<constant name="struts.enable.DynamicMethodInvocation" value="false" />
<constant name="struts.devMode" value="true" />
<constant name="struts.ui.templateSuffix" value="java" />
<constant name="struts.ui.theme" value="simple" />
<!-- <constant name="struts.locale" value="en_IN" />-->
<constant name="struts.date.format" value="dd/MM/yyyy" />
<constant name="struts.xwork.chaining.copyErrors" value="true"/>
<constant name="struts.xwork.chaining.copyFieldErrors" value="true"/>
<constant name="struts.xwork.chaining.copyMessages" value="true"/>
<!-- <include file="security.xml"/>-->
<!-- Configuration for the default package. -->
<package name="default" extends="struts-default,json-default" namespace="/">
<interceptors>
<interceptor name="authenticationInterceptor" class="biz.roitech.urps.interceptor.URPSAuthenticationInterceptor"/>
<interceptor name="browserBackInterceptor" class="biz.roitech.urps.interceptor.BrowserBackInterceptor"/>
<interceptor name="i18NInterceptor" class="biz.roitech.urps.interceptor.CustomI18NInterceptor"/>
<interceptor name="entityManagerInterceptor" class="rt.template.startup.EntityManagerInterceptor"/>
<interceptor name="store" class="org.apache.struts2.interceptor.MessageStoreInterceptor"/>
<interceptor name="mobileAuthenticationInterceptor" class="biz.roitech.urps.interceptor.MobileAuthenticationInterceptor"/>
<interceptor name="myLoggingInterceptor" class="biz.roitech.urps.interceptor.MyLoggingInterceptor"/>
<interceptor-stack name="appon-default-interceptor-stack">
<interceptor-ref name="authenticationInterceptor">
<param name="excludeActions">
Launch,
index,
login,
logout,
signup,
forgetPassword,
authPassword,
generatePassword,
questionAnswer,
activate,
campaignAutoStartStop,
backTologin,
checkUser,
search,
searchByContent,
onload,
legal,
showMoreContent,
countTotalReco,
showFullSearchPage,
storeMrecoIdInSession,
getFullSearchContent,
populateOnloadSearchList,
populateSearchContent_back,
checkPageNameForBack,
populateList_advanceSearch,
sendThreadEmail,
register,
autoCompleteAuthorList,
signupMobApp,
loginMob,
forgetPasswordMob
</param>
</interceptor-ref>
<interceptor-ref name="entityManagerInterceptor">
<param name="excludeActions">
Launch,
index,
logout,
campaignAutoStartStop
</param>
</interceptor-ref>
<interceptor-ref name="i18NInterceptor">
<param name="excludeActions">
</param>
</interceptor-ref>
<interceptor-ref name="defaultStack" />
</interceptor-stack>
<interceptor-stack name="appon-mobile-interceptor-stack">
<interceptor-ref name="mobileAuthenticationInterceptor" />
<interceptor-ref name="entityManagerInterceptor">
<param name="excludeActions">
Launch,
index,
logout,
campaignAutoStartStop
</param>
</interceptor-ref>
<interceptor-ref name="i18NInterceptor">
<param name="excludeActions">
</param>
</interceptor-ref>
<interceptor-ref name="defaultStack" />
</interceptor-stack>
<interceptor-stack name="loggingStack">
<interceptor-ref name="myLoggingInterceptor" />
<interceptor-ref name="defaultStack" />
</interceptor-stack>
</interceptors>
<default-interceptor-ref name="appon-default-interceptor-stack" />
<default-interceptor-ref name="loggingStack"></default-interceptor-ref>
<global-results>
<result name="redirectIndex" type="redirectAction">index</result>
<result name="redirectLogin" type="redirect">custom/pages/global/sessionExpired.jsp</result>
<result name="redirectHome" type="redirectAction">home</result>
</global-results>
<action name="index" >
<interceptor-ref name="store">
<param name="operationMode">RETRIEVE</param>
</interceptor-ref>
<interceptor-ref name="browserBackInterceptor"/>
<interceptor-ref name="appon-default-interceptor-stack" />
<result name="success">custom/pages/global/index.jsp</result>
<result name="input">custom/pages/global/index.jsp</result>
</action>
<action name="home" class="biz.roitech.urps.ume.action.LoginAction" method="home">
<result name="success">custom/pages/global/homePage.jsp</result>
</action>
<action name="register" >
<result name="success">custom/pages/global/registration.jsp</result>
</action>
....
我的struts.xml有什么问题?我相信,当包装内容的顺序错误时,会引发此特定错误。但是我在struts.xml中保持了预期的顺序,如下所示:
1。结果类型? 2.拦截器? 3.default-interceptor-ref? 4. default-action- ref? 5.default-class-ref? 6.全球结果? 7.global-exception-mappings? 8.动作*