关于搭建SSH中添加Spring时出现的问题
先搭建struts2.1,测试通过,接着搭建Spring3.0,步骤如下:
1) addSpring --> 选择core lib 和 web lib --> Jar Library Installation选择Copy*** --> finish;
2) 在web.xml中,添加:
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB/-INF/classes/application*.xml</param-value>
</context-param>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
3) 在applicationContext.xml中添加bean的定义:
<bean id="hwpLoginAction" class="com.action.LoginAction"></bean>
4) 在struts.xml中修改:
<action name="Login" class="hwpLoginAction">
5)在 java build path 中添加 new library --> myeclipse libraries --> struts2 spring libraries;
重启tomcat,
出现:
Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener的错误提示,
求解!!
------解决方案--------------------
http://blog.csdn.net/leiffort/article/details/4512812
------解决方案--------------------