日期:2014-05-16 浏览次数:20432 次
<?xml version="1.0" encoding="UTF-8"?> <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <listener> <listener-class> org.springframework.web.context.ContextLoaderListener </listener-class> </listener> <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> <context-param> <param-name>contextConfigLocation</param-name> <param-value> /WEB-INF/applicationContext-*.xml,classpath*:applicationContext-*.xml </param-value> </context-param> <!--########### log4j的WebAppRoot设置 ##################--> <context-param> <param-name>log4jExposeWebAppRoot</param-name> <param-value>false</param-value> </context-param> <!--########### 初始化日志系统 ##################--> <context-param> <param-name>log4jConfigLocation</param-name> <param-value>/WEB-INF/classes/log4j.properties</param-value> </context-param> <!--########## Spring默认刷新Log4j配置文件的间隔,单位为millisecond #########--> <context-param> <param-name>log4jRefreshInterval</param-name> <param-value>60000</param-value> </context-param> <!--########### log4j日志系统的启动监听器 ##################--> <listener> <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class> </listener> <!-- 数据源配置 --> <resource-ref> <description>DB Connection</description> <res-ref-name>JDBC/PIMS</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> </resource-ref> <!-- 加入proxool数据源的连接方式 --> <servlet> <servlet-name>proxoolServletConfigurator</servlet-name> <servlet-class>org.logicalcobwebs.proxool.configuration.ServletConfigurator</servlet-class> <init-param> <param-name>xmlFile</param-name> <param-value>WEB-INF/proxool.xml</param-value><!--这里对应刚才建立的xml配置文件名--> </init-param> <load-on-startup>1</load-on-startup> </servlet> <!-- proxool提供的管理监控工具,可查看当前数据库连接情况--> <servlet> <servlet-name>Admin</servlet-name> <servlet-class>org.logicalcobwebs.proxool.admin.servlet.AdminServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>Admin</servlet-name> <url-pattern>/admin</url-pattern> </servlet-mapping> </web-app>
<?xml version="1.0" encoding="UTF-8"?> <something-else-entirely> <proxool> <alias>JDBC/PIMS</alias> <driver-url>jdbc:sqlserver://localhost:1433;DatabaseName=bmsh</driver-url> <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class> <driver-properties> <property name="user" value="sa"/> <property name="password" value