Tomcat5.5區別5.0配置

呵呵,寫下來,自己做個備忘吧。
總的來說變化不大,不過應用配置文件和發佈的web.xml 文件有些變化。

conf/下,配置文件不再是原來的那種格式,而是採用類似下面的配置方式
<Context docBase="ecmo" path="/ecmo" reloadable="true" workDir="work\Catalina\localhost\ecmo">
<Resource name="jdbc/MsServerDB"
auth="Container"
type="javax.sql.DataSource"
maxWait="50" maxActive="20"
password="sa"
url="jdbc:jtds:sqlserver://192.168.1.220:1433;DatabaseName=envcmo;SelectMethod=cursor"
driverClassName="net.sourceforge.jtds.jdbc.Driver"
maxIdle="2"
username="sa"/>
<ResourceLink global="jdbc/MsServerDB" name="jdbc/MsServerDB" type="javax.sql.DataSource"/>
</Context>


然後,web.xml文件裏,加上對JNDI的說明:

 
<resource-ref>
<description>DB Connection</description>
<res-ref-name>jdbc/OracleDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章