日期:2014-05-17  浏览次数:20651 次

ssh框架测试类中报错不知道是什么原因求高手解答

------解决方案--------------------
文件不存在/
------解决方案--------------------
WEB-INF目录下有applicationContext.xml?
------解决方案--------------------
applicationContext.xml文件没被找到
你截下项目文件结构图,以及加载applicationContext.xml的web.xml的内容发出来一下
------解决方案--------------------
引用:
web.xml的内容
------解决方案--------------------
  	 <listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>
改成
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
  </listener>
  <context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:/WEB-INF/applicationContext.xml</param-value>
  </context-param>

------解决方案--------------------
你没有看到你下面的报错是文件没有找到吗
------解决方案--------------------
下面的报错是文件没有找到
------解决方案--------------------
先改成这样,试试


<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
  </listener>
  <context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:/WEB-INF/applicationContext.xml</param-value>
  </context-param>