0
点赞
收藏
分享

微信扫一扫

Resin 与 Eclipse的集成


Resin 与 Eclipse的集成

1.      Eclipse 下载

这里就不用说了。

 

2.      Resin下载

可以到这里来下载,​​http://www.caucho.com/download/​​ 我在此下载的是Resin 3.1.12的版本。

下载后解压即可,我是放在D:\Java\OpenSourceJavaSourceCode\resin-3.x\resin-3.1.12目录下。

 

3.      在Eclipse 配置 Resin服务器

3.1   新建一个WEB项目

项目名称为JMS_Servlet,采用的是Dynamicweb project创建的。

 

 

 

3.2   创建、配置resin.conf

在JMS_Servlet项目的根目录下,创建resin.conf,其内容如下:

<!-- Resin 3.1 configuration file -->
<resin xmlns="http://caucho.com/ns/resin"
xmlns:resin="http://caucho.com/ns/resin/core">

<log name="" level="info" path="stdout:"/>

<cluster id="">
<!-- web应用发布目录 -->
<server id="">
<http port="8080"/>
</server>
<resource jndi-name="jms/factory" type="com.caucho.jms.ConnectionFactoryImpl"/>
<resource jndi-name="jms/queue" type="com.caucho.jms.memory.MemoryQueue"/>
<!-- resin安装目录下,为app-default.xml的绝对路径。此处不能使用相对路径。 -->
<resin:import path="D:/Java/OpenSourceJavaSourceCode/resin-3.x/resin-3.1.12/conf/app-default.xml"/>

<host id="" root-directory=".">
<!-- web应用发布目录 -->
<web-app id="/" root-directory="D:\Development\spring2.5.6\JMS_Servlet\WebContent"/>
</host>
</cluster>
</resin>

 

文件内容中,加粗的是需要注意的;

1.   <root-directory />

配置WEB应用的发布目录;

 

2.   <resin:import path=""/>

配置Resin的安装目录下的app-default.xml的绝对路径

 

3.   <web-app id="/"root-directory=""/>

配置WEB应用的发布目录;

 

 

3.3   在Eclipse 中配置Resin 服务

在Eclipse的主菜单上,run 按钮,点击旁边的下拉按钮,点击Run Configurations… ,将会弹出如下窗口,

 

Resin 与 Eclipse的集成_java

在Java Application中(双击Java Appliance 就是新建),输入name,可以随便输入;

l        在Main标签中输入以下内容:

Project,可以为空

Main class : com.caucho.server.resin.Resin

 

Resin 与 Eclipse的集成_servlet_02

 

 

在Arguments标签中:

Programearguments: 这里是配置在项目中的resin.config的文件

例如:-conf "D:\Development\spring2.5.6\JMS_Servlet\resin.conf"

 

VM arguments:

-Dresin.home="D:/Java/OpenSourceJavaSourceCode/resin-3.x/resin-3.1.12"

-Djava.util.logging.manager=com.caucho.log.LogManagerImpl

 

Workingdirectory :

D:\Java\OpenSourceJavaSourceCode\resin-3.x\resin-3.1.12

 

 

l        在JRE中,选择如下:

 

Resin 与 Eclipse的集成_servlet_03

 

l        在Classpath标签如下:

添加resin安装了目录lib下的所有jar包;

添加JDK目录lib下的tools.jar包;

添加项目发布目录lib下的所有jar包;

 

Resin 与 Eclipse的集成_eclipse_04

 

 

 

配置到此处,就配置完成了,可以点击Run按钮,看下执行效果,打开浏览器输入地址:​​http://localhost:8080/​​查看效果。若有有,则说明配置成功。

 

 

 

 

 

举报

相关推荐

0 条评论