struts <data-sources> 配置 放在什么目录下 在线等!!!!!!

解决方案 »

  1.   

    请各位大侠具体点。。是在WEB.XML下 还是struts.xml下。。还是新建一个急急急!!
      

  2.   

    当然是放在struts.xml中了,struts.xml配置文件中有专门配置数据源的标签,
    如果使用了spring,也可以配置在spring配置文件applicationContext.xml中
      
    <?xml version="1.0" encoding="UTF-8" ?> 
    - <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
    - <!--  数据源 --> 
    - <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
    - <property name="driverClassName">
      <value>oracle.jdbc.driver.OracleDriver</value> 
      </property>
    - <property name="url">
      <value>jdbc:oracle:thin:@10.4.52.169:1521:ORCL</value> 
      </property>
    - <property name="username">
      <value>scott</value> 
      </property>
    - <property name="password">
      <value>tiger</value> 
      </property>
      <property name="maxActive" value="100" /> 
      <property name="maxIdle" value="20" /> 
      <property name="maxWait" value="50" /> 
      </bean>
    - <!--  end  -->   </beans>
      

  3.   


    struts.xml放在什么文件夹下的?????在线等了一天了!