我在web.xml中配置了这些
<!-- 下面开始Struts 与Spring的集成配置 -->
<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>Struts-config.xml中
<action-mappings >
<action
attribute="userForm"
input="/index.jsp"
name="userForm"
parameter="method"
path="/user"
scope="request"
type="org.springframework.web.struts.DelegatingActionProxy">
<forward name="main" path="/pages/main.jsp" />
<forward name="fail" path="/index.jsp" />
</action> applicationContext.xml中这样配置
<bean id="commonDAO" class="com.newshieldoa.common.dao.impl.CommonDAOImpl">
<property name="sessionFactory" ref="sessionFactory"></property>
</bean>
<!-- Service 配置 -->
<bean id="userService" class="com.newshieldoa.team.service.impl.UserServiceImpl">
<property name="commonDAO" ref="commonDAO"></property>
</bean>
<!-- Action -->
<bean name="/user" class="com.newshieldoa.struts.action.UserAction">
<property name="userService" ref="userService"></property>
</bean>我想是没有遗漏的地方了, 问题出在哪里了呢?
<!-- 下面开始Struts 与Spring的集成配置 -->
<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>Struts-config.xml中
<action-mappings >
<action
attribute="userForm"
input="/index.jsp"
name="userForm"
parameter="method"
path="/user"
scope="request"
type="org.springframework.web.struts.DelegatingActionProxy">
<forward name="main" path="/pages/main.jsp" />
<forward name="fail" path="/index.jsp" />
</action> applicationContext.xml中这样配置
<bean id="commonDAO" class="com.newshieldoa.common.dao.impl.CommonDAOImpl">
<property name="sessionFactory" ref="sessionFactory"></property>
</bean>
<!-- Service 配置 -->
<bean id="userService" class="com.newshieldoa.team.service.impl.UserServiceImpl">
<property name="commonDAO" ref="commonDAO"></property>
</bean>
<!-- Action -->
<bean name="/user" class="com.newshieldoa.struts.action.UserAction">
<property name="userService" ref="userService"></property>
</bean>我想是没有遗漏的地方了, 问题出在哪里了呢?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货