--------------------------------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>
------解决方案--------------------------------------------------------
太复杂了 不清楚