解决方案 »

  1.   

    classpath:applicationContext-*.xml我才疏学浅,但是觉得这个未必能被识别,也就是说你的applicationContext不一定起作用楼主再试一试
      

  2.   

    spring  文件未加载到。
      

  3.   

    spring  文件未加载,查 配置文件
      

  4.   

    <listener>
    <listener-class>
    org.springframework.web.context.ContextLoaderListener
    </listener-class>
    </listener>
    显然是配置了监听 文件载入方式也对 是不是spring包没导全呢
      

  5.   

      <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
      </listener>
    这行代码放到web.xml的最上面试试
      

  6.   

     <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>classpath:applicationContext-*.xml</param-value>
      </context-param>这里配置的是applicationContext-*.xml
    你的文件是applicationContext.xml控制台的提示信息显示spring和struts整合是成功的?这个有日志吗?
      

  7.   

     web.xml  里面那个实例化的spring容器的 
       </filter-mapping>
      <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>  放到最上面  不然实例化不了