2
我有多个XML配置。多个Struts 2配置文件
struts.xml的
<struts>
<include file="struts-user.xml" />
<package name="baseInterceptors" extends="struts-default">
<interceptor name="...">
...
</interceptor>
...
</package>
<package name="default" extends="struts-default,baseInterceptors">
<action name="...">
...
</action >
...
</package>
</struts>
的struts-user.xml
<struts>
<package name="user" extends="struts-default,baseInterceptors">
<action name="...">
...
</action >
...
</package>
</struts>
但是从baseInterceptors
拦截器不在struts-user.xml
可用。我怎么解决这个问题?
我创建文件'struts-interceptors.xml'并将其包含在所有其他文件中。 Thx你 – gooogenot 2012-04-01 18:37:12
@gooogenot很酷,很高兴你能解决它。不过,您不需要将其包含在所有其他文件中。 – 2012-04-01 18:46:16