转自:http://blog.csdn.net/duck04551/archive/2010/08/15/5813135.aspx
1.MyEclipse8.5项目空间所有在目录为:F:\Workspaces,在该目录下有一个Tomcat, MyEclipse8.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/blogdatabase" type="javax.sql.DataSource" password="895278" driverClassName="com.microsoft.jdbc.sqlserver.SQLServerDriver" maxIdle="2" maxWait="5000" username="sa" url="jdbc:microsoft:sqlserver://127.0.0.1:1433;databaseName=blog;" maxActive="4" />
</Context>
步骤二
将驱动包msbase.jar,mssqlserver.jar,msutil.jar复制到Genuitec\Common\plugins\com.genuitec.eclipse.easie.tomcat.myeclipse_8.5.0.me201003121946\tomcat\lib目录。
注:该目录为MyEclipse8.5的安装目录。
到此已经完成配置。
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/duck04551/archive/2010/08/15/5813135.aspx