标签:
<host-default>
<!-- creates the webapps directory for .war expansion (据说这个是war发布用的,可以把下面这段删除!)-->
<web-app-deploy path="D:/test/webapps"
expand-preserve-fileset="WEB-INF/work/**"
<!-- multiversion-routing="${webapp_multiversion_routing}" 这时这句话删除,有兴趣的可以去读官方文档,我也不知道原因-->
/>
</host-default>
<!-- auto virtual host deployment in hosts/foo.example.com/webapps -->
<host-deploy path="hosts"/>
<!-- the default host, matching any host name -->
<host id="" root-directory=".">
<!--
- webapps can be overridden/extended in the resin.xml
-->
<web-app id="/" root-directory="D:/test/webapps/hello2"/>
只改以上两处,就能达到效果
1,添加相应的数据库驱动jar包,到resin/lib目录
下面是sqlserver的配置
<database jndi-name=‘jdbc/hello2‘>
<driver type="com.microsoft.sqlserver.jdbc.SQLServerDriver">
<url>jdbc:sqlserver://192.168.2.186:1433;DatabaseName=hello2</url>
<user>hndoc</user>
<password>hndoc123</password>
</driver>
<prepared-statement-cache-size>8</prepared-statement-cache-size>
<max-connections>500</max-connections>
<max-idle-time>30s</max-idle-time>
</database>
下面是mysql的配置:
<database jndi-name=‘jdbc/test_mysql‘>
<driver type="com.mysql.jdbc.Driver">
<url>jdbc:mysql://localhost:3306/test</url>
<user></user>
<password></password>
</driver>
</database>
下一篇将介绍如何在eclipse里面用resin进行开发调试
标签:
原文地址:http://www.cnblogs.com/bingosblog/p/5792674.html