刚刚成功试过resin启动,默认的root是resin的doc和admin的一个index页面。
现在想移植一个tomcat的web实例到resin来。于是想找eclipse的resin插件,结果发现不支持resin3.1, 再找了找还真没找到了。
没办法, 看看怎样直接在eclipse中用命令行运行好了。这倒好, resin的主页上有提供这个方法的教学:
http://wiki.caucho.com/IDE
引用
Starting Resin from within the IDE
Resin is started and stopped by the IDE. Console messages appear in the console window of the IDE.
IDE configuration value description
Classpath all of the jars in resin.home/lib, see Global Library|
Java argument -Djava.system.class.loader=com.caucho.loader.SystemClassLoader
Main class com.caucho.server.resin.Resin
Program argument -conf conf/development.conf See development.conf
Program argument -server-root /path/to/webapp The location of the web-app
[edit] Additional configuration
Some systems require additional configuration, indicated by Resin error messages.
IDE configuration value description
Classpath java.home/lib/tools.jar Needed for compiling java files
Java argument -Dresin.home=/usr/local/resin Needed if Resin cannot discover the value programmatically
整理一下,应该是这样的
resin运行需要指定三个参数:root、conf、resin.home,
而root和resin.home应当都是同一个位置,就是resin安装的根目录
而conf默认的是resin.home/conf/resin.conf, 这个会根据每个web应用不同,因此往往需要创建一个。
1) classpath中要把resin.home/lib下面的所有jar包添加进来
2)运行的主程序是com.caucho.server.resin.Resin
3)通过jvm参数指定resin.home, -Dresin.home=/usr/local/resin;
主程序参数指定root和conf:-conf conf/development.conf
-server-root /path/to/webapp
4)添加jvm参数:-Djava.system.class.loader=com.caucho.loader.SystemClassLoader
经过我的实验, root实际上可以不指定。
这个conf比较重要, 官方的wiki推荐我们使用
http://wiki.caucho.com/Development.conf,我把内容贴出来,注意看里面的注释:
<resin xmlns="http://caucho.com/ns/resin"
xmlns:resin="http://caucho.com/ns/resin/core">
<resin:set var="http.port" default="8080"/>
<resin:set var="log.level" default="fine"/>
<log path="stdout:">
<logger name="" level="${Var['log.level']}"/>
</log>
<server>
<class-loader>
<tree-loader path="${resin.home}/lib"/>
</class-loader>
<http server-id="" host="*" port="${Var['http.port']}"/>
<dependency-check-interval>2s</dependency-check-interval>
<javac compiler="internal" args=""/>
<resin:import path="${resin.home}/conf/app-default.xml"/>
<resin:if test="${resin.isProfessional()}">
<cache path="WEB-INF/work/cache" memory-size="8M"/>
</resin:if>
<web-app-default>
<cache-mapping url-pattern="/" expires="5s"/>
<cache-mapping url-pattern="*.gif" expires="60s"/>
<cache-mapping url-pattern="*.jpg" expires="60s"/>
<allow-servlet-el/>
</web-app-default>
<host id="">
<web-app id="/"><!--这里可以加你的host, 可能是像下面这样-->
<!--<web-app id='/myprojectName' document-directory="d:\myprojectName\webapp"> -->
<session-config>
<file-store>WEB-INF/work/sessions</file-store>
</session-config>
</web-app>
</host>
</server>
</resin>
里面加了些注释的地方,说的是如何设定web应用的context和path
这里面还可以设置日志级别以及resin启动的端口
对于log的设定可以参考:
http://www.caucho.com/resin-3.0/config/log.xtp#stdout-log
实际上resin的log就是基于JDK logging interface
分享到:
相关推荐
比如一台SERVER的错误率是1%的话,那么支持负载平衡的两个Resin服务器就可以使错误率降到0.01%。 Resin提供了最快的jsp/servlets运行平台。在java和javascript的支持下,Resin可以为任务灵活选用合适的开发语言。...
Resin的一种先进的语言XSL(XML stylesheet language)可以使得形式和内容相分离。 如果您选用jsp平台作为internet商业站点的支持,那么速度、价格和稳定性都是要考虑到的,resin十分出色,表现更成熟,很具备商业软件...
官方最新版的resin服务器,可与Apache,IIS服务器集成。最新版核心配置文件已经改为xml
比如一台SERVER的错误率是1%的话,那么支持负载平衡的两个Resin服务器就可以使错误率降到0.01%。 Resin 2.1.4( resin-2.1.4.zip),你可以从http://www.caucho.com/download/ 站点上查询Resin的最新版本并下载它...
resin 3.1.7a resin web服务器 weblogic websphere
Resin是CAUCHO公司的产品,是一个非常流行的application server,对servlet和JSP提供了良好的支持,性能也比较优良,resin自身采用JAVA语言开发。
resin3 resin3下载 resin-3.0.21下载
一款同tomcat相似的强大的web开发的服务器工具
resin-sdk, 使 Resin.io 支持JavaScript应用程序的SDK 树脂 SDK官方 JavaScript Resin.io SDK 。 [Gitter](https://badges.gitter.im/Join chat 。svg )!角色这个 MODULE的目的是为开发者提供一个
ACPCHE+RESIN+JDK1.5架设WEB服务器.pdf
NULL 博文链接:https://amsz.iteye.com/blog/816368
Resin是CAUCHO公司的产品,是一个非常流行的支持servlets和jsp的引擎,速度非常快。Resin本身包含了一个支持HTTP/1.1的WEB服务器。虽然它可以显示动态内容,但是它显示静态内容的能力也非常强,速度直逼APACHESERVER...
resin服务器有3部分,resin1,resin-webapp,resin-lib,由于大小限制分开传
这是我收藏到 resin 4 专业版 的 最新的 resin 比 tomcat 要快100倍 更加简单。
Chapter 1 - An Overview of Resin Chapter 2 - Setting up the Resin Server Part II - Application Development with Resin Chapter 3 - Using JSP and Resin Chapter 4 - Using Servlets and Resin ...
Eclipse配合Resin开发web,附加mysql数据库连接池配置设置整合与测试.docx
绿色版resin web服务器 免注册,免安装,简单,功能强大,默认配置
该演示应在RPI 1和2上运行还建议您增加RPI上分配给GPU的内存量,可以通过在计算机上安装SD卡并在resin-boot分区中打开config.txt文件来实现。 在config.txt您需要注释掉以下行: gpu_mem=16并取消注释行: ##gpu_...
resin服务器有3部分,resin1,resin-webapp,resin-lib,由于大小限制分开传
resin 据说是世界上最快的web服务器