SSH 集成的项目中, 在spring集成代理struts问题中, 似乎有两种方式,一种是在action 中修改type 为 type="org.springframework.web.struts.DelegatingActionProxy"  
在applicationContext.xml 中配置 
<bean name="/city" class="org.zero.space.action.CityAction">
    <property name="biz" ref="cityBiz"></property>
</bean>另外一种是不是不需要修改action 的type  , 而在struts-config.xml中添加
<plug-in className="org.springframework.web.struts.ContextLoaderPlugIn">
   <set-property property="contextConfigLocation" value="classpath:applicationContext.xml"/>
</plug-in>applicationContext.xml的配置不变呢?

解决方案 »

  1.   

    还看到了另一种写法
    <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>/WEB-INF/application*.xml,classpath*:application*.xml</param-value>
      </context-param>
      <listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
      </listener>这种是监听器的 和其它几种配置费那个是相比有什么不同?
      

  2.   

    第一种是struts1与spring的集成;
    第二种是struts2与spring的集成。
      

  3.   


    我用的是Struts 1.2 上面说的方法都能用 那用那种方式好呢?
      

  4.   

    在spring中进行配置,我用的第一种.其实在struts中集成的话可以用到好多方式的,那要看哪种方式简单易操作!