java.lang.IllegalStateException异常产生的缘由及解决办法

问题描述:web

在进行ssh框架整合的时候,引入struts测试的action的时候出现的问题spring

解决办法:app

这是由于没有找到WebApplicationContext这个配置文件,no ContextLoaderListener registered缺乏监听器,在web.xml配置中配置监听器就能够了框架

  <!-- 让spring在系统启动时开始工做 -->
  <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>classpath:applicationContext.xml</param-value>
    </context-param>
    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>
ssh

这样就解决这个问题了测试

相关文章
相关标签/搜索