首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > J2SE开发 >

请问org.springframework.web.context.ContextLoaderListener配置struts2和spring以及路径关系

2012-09-27 
请教org.springframework.web.context.ContextLoaderListener配置struts2和spring以及路径关系-----------

请教org.springframework.web.context.ContextLoaderListener配置struts2和spring以及路径关系
--------------------------------web.xml----------------

利用org.springframework.web.context.ContextLoaderListener在web.xml中已经配置好。
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>

---------------------------struts.xml-------------------------------------

<struts>
<package name="struts2" extends="struts-default">
<action name="login" class="loginAction">
<result name="input">/index.jsp</result>
<result name="success">/result.jsp</result>
</action>
</package>
</struts> 
-------------------------------applicationContext.xml------------------------
<bean id="loginDao" class="com.test.Dao.LoginDaoImpl">
</bean>  
  <bean name="loginAction" class="com.test.Action.Login" scope="prototype">
  <property name="loginDao" ref="loginDao"/>
</bean>

[解决办法]
太复杂了 不清楚

热点排行