tomcat JNDI配置实例
本帖最后由 lqph3387 于 2010-12-14 15:04 编辑
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Context path="/" docBase="./" debug="1" reloadable="true">
<Resource name="jndi-test" auth="Container"
type="javax.sql.DataSource"
driverClassName="oracle.jdbc.driver.OracleDriver"
url="jdbcracle:thin192.168.1.210:1521:database" username="username"
password="password" maxActive="100" maxIdle="10" maxWait="600" /> </Context>
<Valve className="org.apache.catalina.valves.FastCommonAccessLogValve" directory="logs" prefix="localhost_access." suffix=".log"
pattern="combined" resolveHosts="false"/>
</Host>
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Context path="/" docBase="./" debug="1" reloadable="true">
<Resource name="jndi-test" auth="Container"
type="javax.sql.DataSource"
driverClassName="oracle.jdbc.driver.OracleDriver"
url="jdbcracle:thin192.168.1.210:1521:database" username="username"
password="password" maxActive="100" maxIdle="10" maxWait="600" /> </Context>
<Valve className="org.apache.catalina.valves.FastCommonAccessLogValve" directory="logs" prefix="localhost_access." suffix=".log"
pattern="combined" resolveHosts="false"/>
</Host>
none