您的位置:首页 > 其它

关于SSH的配置问题

2008-01-04 14:55 211 查看
1.配置监听器( web.xml)

< listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>自己spring的xml路径</param-value>
</context-param>

2.struts +srping +hibernate的结合

在struts-config中的Action中把type属性的值指向spring的DelegatingActionProxy类

eg:

<action
attribute="loginForm"
input="/login.jsp"
name="loginForm"
path="/login"
scope="request"
type="org.springframework.web.struts.DelegatingActionProxy">

在spring中注入strut和hibernate

<bean name="/login" class="com.der.struts.action.LoginAction">
<property name="user">
<ref bean="UserDAO"/>
</property>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: