1.安装eclipse , resin ,配置环境变量
2. 点击:Eclipse - run configuration - Java application - New_configuration
2.1 project 一栏 选择要运行的web工程 ,Main class 一栏填入Resin的启动类,我们使用resin3.x的版本,一般是com.caucho.server.resin.Resin
2.2 选择Arguments ,在 program arguments中填入resin的相关参数 :
-conf "/home/xiaoxiao/opt/resin-standard/conf/resin-www.conf"
其中resin-www.conf可以任意命名,resin-www.conf文件中需要配置host id,及web-app的document-directory目录地址:
<host id="xxx.xxx.com" root-directory=".">
<web-app id="/" document-directory="你的工程/src/main/webapp"/>
</host>
下面的 VM arguments 是指定Log manager的实现类和JVM启动堆参数。这个我也不太懂就先不深究。 里面填写:
-Djava.util.logging.manager=com.caucho.log.LogManagerImpl
-Dresin.home="/home/xiaoxiao/opt/resin-standard"
2.3 点击 Classpath 在Bootstrap Entries 中选择Add External JARs 将 "resin-home"/lib下的jar引入到classpath中。
3. 点击运行吧。