用下例来表示在Servlet时,拦截去做Spring.
<controller processorClass="org.springframework.web.struts.DelegatingRequestProcessor"></controller>
<!-- 装载Spring配置文件夹,随应用启动创建ApplicationContext实例 -->
<plug-in className="org.springframework.web.struts.ContextLoaderPlugIn">
<set-property property="contextConfigLocation" value="/WEB-INF/applicationContext.xml"/>
</plug-in>
<controller processorClass="org.springframework.web.struts.DelegatingRequestProcessor"></controller>
<!-- 装载Spring配置文件夹,随应用启动创建ApplicationContext实例 -->
<plug-in className="org.springframework.web.struts.ContextLoaderPlugIn">
<set-property property="contextConfigLocation" value="/WEB-INF/applicationContext.xml"/>
</plug-in>