记录一下, 这里只给出server.xml的配置方法,其它的配置及测试代码在 这里
<Logger className="org.apache.catalina.logger.FileLogger"
directory="logs" prefix="localhost_log." suffix=".txt"
timestamp="true"/>
<Context docBase="cmmi" path="/cmmi" reloadable="true" crossContext="true">
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="localhost_lovehome_log." suffix=".txt" timestamp="true"/>
<Resource name="jdbc/access" auth="Container" type="javax.sql.DataSource"
maxActive="100" maxIdle="30" maxWait="10000"
driverClassName="sun.jdbc.odbc.JdbcOdbcDriver"
username="sa" password="12345"
url="jdbc:odbc:work"
defaultAutoCommit="true" removeAbondoned="true"
removeAbondonedTimeout="60" logAbondoned="true"/>
</Context>
directory="logs" prefix="localhost_log." suffix=".txt"
timestamp="true"/>
<Context docBase="cmmi" path="/cmmi" reloadable="true" crossContext="true">
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="localhost_lovehome_log." suffix=".txt" timestamp="true"/>
<Resource name="jdbc/access" auth="Container" type="javax.sql.DataSource"
maxActive="100" maxIdle="30" maxWait="10000"
driverClassName="sun.jdbc.odbc.JdbcOdbcDriver"
username="sa" password="12345"
url="jdbc:odbc:work"
defaultAutoCommit="true" removeAbondoned="true"
removeAbondonedTimeout="60" logAbondoned="true"/>
</Context>