1、首先下载相关工具:resin-4.0.16.tar和jar1.6(1.7会有不兼容的问题)
在MyEclipse中配置resin
2、resin可以理解为tomcat一样的服务器布置起来也比较简单,
在MyEclipse属性中找到MyEclipse-Servers-Resin,然后如图设置resin地址
然后在服务器中就会看到resin启动
在resin中配置项目
3、找到resin目录conf 的resin.xml中,找到 这个标签<web-app id="/" root-directory="E:\java\Workspaces\MyEclipse10_5\eagle.product2\eagle\src\main\webapp"/>
将后边root-directory改成类似于这样的地址。
4、<database>
<jndi-name>jdbc/ucenterMysqlDataSourceReadonly</jndi-name>
<driver type="com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource">
<url>jdbc:mysql://db.db.me:3306/database?useUnicode=true&characterEncoding=gbk&zeroDateTimeBehavior=convertToNull&autoReconnect=true</url>
<user>deployment</user>
<password>123456</password>
</driver>
<!-- configures how many prepared statements Resin should cache for each connection -->
<prepared-statement-cache-size>8</prepared-statement-cache-size>
<max-connections>20</max-connections>
<max-idle-time>30s</max-idle-time>
<connection-wait-time>30s</connection-wait-time>
<transaction-timeout>30s</transaction-timeout>
<ping>ture</ping>
<ping-table>jeehe_comment</ping-table>
<ping-interval>1s</ping-interval>
</database>
在resin中写入数据库的东西。
这样启动resin就可以指定到某个项目和数据库。resin自带自动编译功能,但是有点慢