2016-11-08 29 views
0

Mavenを使用してstruts2.5.5を使用しています。要素タイプ "interceptor"の内容は "(param)*"と一致する必要があります

要素型"interceptor"の内容はstruts.xmlファイルで"(param)*"

と一致している必要があります:

<?xml version="1.0" encoding="UTF-8"?> 
<!DOCTYPE struts PUBLIC 
    "-//Apache Software Foundation//DTD Struts Configuration 2.5//EN" 
    "http://struts.apache.org/dtds/struts-2.5.dtd"> 
<struts> 
    <package name="default" namespace="/action" extends="struts-default"> 
     <interceptors> 
     <interceptor name="authenticationInterceptor" class="AuthenticationInterceptor"> 
     <interceptor-stack name="secureStack"> 
      <interceptor-ref name="authenticationInterceptor"></interceptor-ref> 
      <interceptor-ref name="defaultStack"></interceptor-ref> 
     </interceptor-stack> 
     </interceptor> 
    </interceptors> 
    <action name="login"> 
     <result>login.jsp</result> 
    </action> 
    <action name="LoginAction" class="LoginAction"> 
     <result name="success" type="redirectAction"> 
     <param name="actionName">task</param> 
     <param name="namespace">/action</param> 
     </result> 
     <result name="input">login.jsp</result> 
    </action> 
    </package> 
</struts> 

答えて

0

インターセプタを

私はインターセプタタグでエラーが発生しました要素が閉じられていません:

<interceptor name="authenticationInterceptor" class="AuthenticationInterceptor"> 

したがって、彼はその位置に<param>エレメンだけを期待している間に、<interceptor-stack>の宣言を本文として取ろうとしています。

ただ、自己終了タグ:

<interceptor name="authenticationInterceptor" class="AuthenticationInterceptor" /> 
関連する問題