
1.MyEclipse8.5 项目空间所有在目录为:F:/Workspaces,在该目录下有一个 Tomcat,My
Eclipse8.5 就是用它作服务的,如目录所示:F:/Workspaces/.metadata
2.本人所测试项目保存在:F:/Workspaces/myBlog
步骤一
配置数据库连接,在 F:/Workspaces/.metadata/.me_tcat/conf/context.xml 增加连接,下面
中红色语句,文件内容如下所示:
<!-- The contents of this file will be loaded for each web application -->
<Context>
<!-- 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
name="jdbc/myschool"
auth="Container"
type="javax.sql.DataSource"
password="sxxfd"
driverClassName="oracle.jdbc.driver.OracleDriver"
maxIdle="2"