[code="java"][/code]SSH 集成的项目中, 在spring集成代理struts问题中, 似乎有两种方式,一种是在action 中修改type 为
[code="xml"]type="org.springframework.web.struts.DelegatingActionProxy" [/code]
在applicationContext.xml 中配置
[code="xml"]
[/code]
另外一种是不是不需要修改action 的type , 而在struts-config.xml中添加
[code="xml"]
[/code]
applicationContext.xml的配置不变呢?
另外还看到了一种写法
[code="xml"]
contextConfigLocation
/WEB-INF/application*.xml,classpath*:application*.xml
org.springframework.web.context.ContextLoaderListener
</listener[/code]
这种是监听器的 , 好像是把action 与spring 的配置信息 单独写在一个 xml 文件中的 ,是这样的么?
那种写法 好点 我比较喜欢第二种
[b]问题补充:[/b]
多问些问题 ,在web.xml中配置的话 怎么就灵活了 , 能举个例子么?
另外使用在web.xml 中配置的话 , 那 Struts 和 Spring 的集成信息又放在哪里呢?
是自己单独建立一个xml 文件写进去呢? 还是也和其它的配置信息统统卸载applicationContext.xml 中呢?
[b]问题补充:[/b]
哦 了解 主要还是为预防需要写多个Spring 配置文件的设想的.