现在的问题是界面有个bean list 提取的时候显示 cannot find bean list in any scope
设system.out在action里面 发现根本没有运行到action里面<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd"><struts-config>
<form-beans>
<form-bean name="newsForm" 
       type="com.network.struts.form.NewsForm"/>
</form-beans>

<global-forwards>
<forward name="page" path="/page.do"/>
</global-forwards>


<action-mappings> <action path="/page" type="com.network.struts.action.ListNewsAction" scope="request">
       <forward name="success" path="/category/news/index.jsp"/>
    </action>
    
<action input = "/index.jsp"
path="/ListNewsAction"
type="com.network.struts.action.ListNewsAction"
name="newsForm"
parameter="methode"
scope="request"
validate="false">
<forward name="success" path="/category/news/index.jsp" />
</action>

</action-mappings>

<plug-in className= "org.springframework.web.struts.ContextLoaderPlugIn"> 
<set-property property="contextConfigLocation"
  value="/WEB-INF/applicationContext.xml"/> 
</plug-in>
</struts-config> struts.xml<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"><beans> <!-- 原型的ShowAttackSolutionAction对象,通过get/set注入业务逻辑 -->
<bean name="/ListNewsAction" 
      class="com.network.struts.action.ListNewsAction" 
      singleton="false">
<property name="newsManager">
<ref local="NewsManager"></ref>
</property>
</bean>
<!-- 单例的AttackSolutionServices对象,通过get/set注入DAO -->
<bean id="NewsManager" 
      class="com.network.service.impl.NewsManager" 
      singleton="false">
<property name="newsDAO">
<ref local="NewsDAO"></ref>
</property>
</bean>
<bean id="dataSource" 
class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName"
value="com.mysql.jdbc.Driver">
</property>
<property name="url"
value="jdbc:mysql://localhost:3306/studentnetworktest">
</property>
<property name="username" value="root"></property>
<property name="password" value="123456"></property>
</bean> <!-- Spring对Hibernate的支持,Spring对SessionFactory的封装 -->
<bean id="SessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource">
<ref bean="dataSource" />
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">
org.hibernate.dialect.MySQLDialect
</prop>
</props>
</property>
<property name="mappingResources">
<list>
<value>com/network/model/News.hbm.xml</value>
</list>
</property>
</bean> <!-- Spring对Hibernate的支持,配置事务管理 -->
<bean id="transactionManager" 
      class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory">
<ref local="SessionFactory" />
</property>
</bean> <!-- Spring对Hibernate的支持,DAO注入SessionFactory -->
<bean id="NewsDAO" 
      class="com.network.dao.hibernate.NewsDAO" 
      singleton="true">
<property name="sessionFactory">
<ref local="SessionFactory" />
</property>
</bean>

<!-- Spring对事务管理的支持,利用AOP为AttackSolutionDAO注入事务处理的工作 -->
<bean id="NewsDAOProxy" 
      class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
<property name="transactionManager">
<ref bean="transactionManager" />
</property>
<property name="target">
<ref local="NewsDAO" />
</property>
<property name="transactionAttributes">
<props>
<prop key="save*">PROPAGATION_REQUIRED</prop>
<prop key="update*">PROPAGATION_REQUIRED</prop>
<prop key="delete*">PROPAGATION_REQUIRED</prop>
</props>
</property>
</bean>
</beans> applicationContext 

解决方案 »

  1.   

     <set-property property="contextConfigLocation"
                          value="classPath:applicationContext.xml"/> 
      

  2.   


    直接报错啊亲
    org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from ServletContext resource [/classPath:applicationContext.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/classPath:applicationContext.xml]
    java.io.FileNotFoundException: Could not open ServletContext resource [/classPath:applicationContext.xml]