元素类型的内容"拦截器"必须匹配"(参数)*"

时间:2016-11-08 12:19:39

标签: xml configuration struts2 interceptor dtd

我正在使用Maven工作struts2.5.5。

我在拦截器标签中出错:

  

元素类型$a = start-process notepad.exe -PassThru $a.Id 10536 的内容必须与"interceptor"

匹配
struts.xml文件中的

"(param)*"

1 个答案:

答案 0 :(得分:0)

拦截器元素未关闭:

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

因此它试图将<interceptor-stack>声明作为正文,而他只期望那个位置的<param>元素。

只需自行关闭代码:

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