在MyEclipse Tomcat配置JNDI(mysql)

05 九月 2010 | J2EE | Tags: , , ,

在<workspace目录>\.metadata\.me_tcat\conf目录下找到context.xml文件
加入以下内容,按照需要进行更改

	<Resource name="jdbc/xxxx" auth="Container" type="javax.sql.DataSource"
	maxActive="100" maxIdle="30" maxWait="1000" username="root" password="123"
	driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://127.0.0.1:3306/xxxxxxxxxx"
	removeAbandoned="true" removeAbandonedTimeout="60" logAbandoned="true"/>

在Myeclipse安装目录找到类似下面的路径,可能你的和我不太一样
<Myeclipse安装目录>\Common\plugins\com.genuitec.eclipse.easie.tomcat.myeclipse_8.5.0.me201003121946\tomcat\lib

复制mysql的驱动包进这个目录


6 Responses to “ 在MyEclipse Tomcat配置JNDI(mysql) ”

  1. 不错的文章

  2. 小邪 says:

    哎,楼上的评论就不能有点新花样么 。。。。

    • fatkun says:

      就是说~~没意义的评论~

  3. oYoo says:

    路过,学习了。

    • fatkun says:

      欢迎路过·~

  4. 8101 says:

    外行,看不懂

发表评论

电子邮件地址不会被公开。

您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">