您的位置:首页 > 编程语言 > Java开发

eclipse添加新web程序的方法

2013-02-23 10:36 148 查看
在conf\Catalina\localhost目录下添加myweb.xml文件,内容如下

<?xml version="1.0" encoding="gbk"?>

<!-- The contents of this file will be loaded for each web application -->

<CONTEXT docBase="E:/java/code/myweb" path="/myweb" reloadable="false" crossContext="true"><!-- Default set of monitored resources --><WATCHEDRESOURCE>WEB-INF/web.xml</WATCHEDRESOURCE>

<!-- Uncomment this to disable session persistence across Tomcat restarts --><!--

<Manager pathname="" />

--><!-- Uncomment this to enable Comet connection tacking (provides events

on session expiration as well as webapp lifecycle) --><!--

<Valve className="org.apache.catalina.valves.CometConnectionManagerValve" />

-->

<RESOURCE url="jdbc:mysql://localhost:3309/peonyoamain?autoReconnect=true" name="jdbc/ds" auth="Container" type="javax.sql.DataSource" driverClassName="com.mysql.jdbc.Driver" username="root" password="123456" maxActive="200" maxIdle="50" maxWait="1000" />

</CONTEXT>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: