不知道你们有遇到过没有我单独spring+ibatis对数据库操作成功了
但是 只要一加struts2.0就完了 spring主入 就无效了
我用TEST类测试 又可以 求高手看下我的web .xml文件
<!-- struct2 -->
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

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

  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>

解决方案 »

  1.   

    那应该怎么样 我spring文件一定是对的要不 用TEST 测试 怎么是对的呢
      

  2.   

    兄弟  你确定你的Spring与Struts2集成好了吗.?
      

  3.   

    我的spring通过web.xml启动 不存在集成啊!!!!!!!!!!
    我原来SSH  也是这样的 spring可以通过struts1 启动 也可以通过web .xml启动
      

  4.   

    我觉得根本原因就是我的spring就没启动难道通过 web .xml不能启动spring?
    我之前怎么启动的 到底是怎么回师请高手指点
      

  5.   

    <context-param>   
      <param-name>contextConfigLocation</param-name>   
      <param-value>/WEB-INF/applicationContext.xml</param-value>   
    </context-param>
    整合Spring的时候俺都没配这一段,那个listener默认就是去这里找的.!
    你先不慌集成,看看你在web环境下面能否拿到这个ApplicationContext
    WebApplicationContextUtils.getRequiredWebApplicationContext(servletContext);启服务器,在一个servlet中拿他,, 拿得到在说
      

  6.   

    谁有spring+struts2+ibatis证合例子 发个给我 
    QQ303743000 我不想再改这个问题了 恶心