(我使用的jdk为:jdk1.5.0_01,环境变量JAVA_HOME=D:\jdk1.5.0_01,
path=D:\jdk1.5.0_01\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;)
1.下载:http://www.caucho.com/download/resin-3.0.10.zip
解压到D:\resin-3.0.10
2.运行setup.exe。指定resin Home:D:\resin-3.0.10
3.运行httpd.exe.
4.修改端口为80:打开D:\resin-3.0.10\conf\resin.conf,
找到"8080",修改为80,保存,重新启动resin。
<!-- The http port -->
<http server-id="" host="*" port="80"/>
5.发布webapp:
在resin.conf的结尾处: <host id="" root-directory=".">
<!--
- configures an explicit root web-app matching the
- webapp's ROOT
-->
<web-app id='/' document-directory="webapps/ROOT"/>
</host>
修改为:
<host id="" root-directory=".">
<!--
- configures an explicit root web-app matching the
- webapp's ROOT
-->
<web-app id='/' document-directory="webapps/ROOT"/>
<web-app id='/lizongbo' document-directory="E:/lizongbo/oscachedemo/test"/>
</host>
重新启动resin,访问 http://localhost/lizongbo/ 就可以看到效果。
6.配置虚拟主机:
在文件结尾处</server>之前加上下面一段:
<host id="lizongbo.myresintest.com" root-directory=".">
<web-app id='/' document-directory="webapps/ROOT"/>
<web-app id='/lizongbo' document-directory="E:/jb/oscachedemo/test"/>
</host>
保存文件。
在c:\windows\system32\drivers\etc\host文件里加上下面一行:
lizongbo.myresintest.com 127.0.0.1
保存host文件。
重新启动resin,重新打开浏览器。输入http://lizongbo.myresintest.com/lizongbo/
就可以看到虚拟主机配置成功。
7.发布我的webapp的时候遇到了下面的错误信息。
org.xml.sax.SAXNotRecognizedException: http://xml.org/sax/features/validation
查找资料http://www.google.com/search?hl=zh-CN&inlang=zh-CN&newwindow=1&q=resin+org.xml.sax.SAXNotRecognizedException&lr=,(参考:http://www.slamb.org/svn/repos/projects/axamol/sax-pipeline/README)
需要新建一个 jaxp.properties, 内容如下:
javax.xml.parsers.SAXParserFactory: org.apache.xerces.jaxp.SAXParserFactoryImpl
保存文件到$JAVA_HOME/jre/lib/下面
接下来可能会出现下面的错误信息:
javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.SAX
ParserFactoryImpl could not be instantiated: java.lang.NullPointerException
因此还需要把xercesImpl.jar复制到D:\jdk1.5.0_01\jre\lib\endorsed下面(没有这个目录就创建这个目录)
重新启动resin,我的webapp启动成功了。
访问 http://lizongbo.myresintest.com/mywebapp/,页面正常出现。
b.另外一种更简单的解决方法,不需要修改jdk的配置
((此方法没有测试过,请参考http://www-900.ibm.com/developerWorks/cn/webservices/ws-axisfaq/index.shtml和http://www.caucho.com/quercus/faq/question.xtp?question_id=295)):
<host id="lizongbo.myresintest.com" root-directory=".">
<web-app id='/' document-directory="webapps/ROOT"/>
<web-app id='/lizongbo' document-directory="E:/jb/oscachedemo/test">
<system-property javax.xml.transform.TransformerFactory="org.apache.xalan.processor.TransformerFactoryImpl"/>
<system-property javax.xml.parsers.DocumentBuilderFactory="org.apache.xerces.jaxp.DocumentBuilderFactoryImpl"/>
<system-property javax.xml.parsers.SAXParserFactory="org.apache.xerces.jaxp.SAXParserFactoryImpl"/>
<system-property org.xml.sax.driver="org.apache.xerces.parsers.SAXParser"/>
</web-app>
</host>
8.resin支持二级域名。
同6,主机名和doc路径,都使用正则表达式。
(例子:<host url-regexp='^([^/]*).test.com' app-dir='web/$1'/>)
<host id="^(*).lizongbo.com" root-directory=".">
<!--
- configures an explicit root web-app matching the
- webapp's ROOT
-->
<web-app id='/' document-directory="webapps/ROOT"/>
<web-app id='/lizongbo' document-directory="E:/jb/oscachedemo/test"/>
</host>
再配合上泛域名解析,就非常方便了。
(在host文件里加上
127.0.0.1 aaa.lizongbo.com
127.0.0.1 bbb.lizongbo.com
然后访问这两个主机名,可以看见虚拟主机解析成功。
)
9.在Jbuilder2005中支持resin.
在 http://www.caucho.com/projects/index.xtp 下载 http://www.caucho.com/projects/jbuilder/resin-jbuilder-7.jar
保存到 JBuilderHome/lib/ext下。
(Jb2005不支持)
10.一个host配置参考:
<host id='www.lizongbo.com'>
<welcome-file-list>index.jsp, index.htm, index.html </welcome-file-list>
<error-log id='logs/lizongbo.com.log'/>
<doc-dir>E:/jb/lizongbo/webapp</doc-dir>
<web-app id='/'>
<classpath id='WEB-INF/classes'
source='WEB-INF/classes'
compile='false'/>
<servlet-mapping url-pattern='/servlet/*' servlet-name='invoker'/>
<servlet-mapping url-pattern='*.jsp' servlet-name='jsp'/>
<servlet-mapping url-pattern='*.html' servlet-name='jsp'/>
<character-encoding>UTF-8</character-encoding>
<session-config>
<session-max>4096</session-max>
<session-timeout>30</session-timeout>
<enable-cookies>true</enable-cookies>
<enable-url-rewriting>true</enable-url-rewriting>
</session-config>
</web-app>
</host>
11.与IIS整合。
安装好(WinXP+SP2下的)IIS,运行D:\resin-3.0.10\setup.exe
点Apply即可。
我的电脑-->右键-->管理-->Internet信息服务-->网站-->默认网站,
右键--〉属性-->ISAPI筛选器-->添加
筛选器名称:Resin_3.0.10
可执行文件:C:\Inetpub\scripts\isapi_srun.dll
确定,然后重新启动iis。再启动resin.此时就可以访问
http://localhost/index.jsp了
如果没有启动resin。
将得到下面的错误信息:
Can't contact Servlet Runner at localhost:6802
分享到:
相关推荐
Windows下Resin的配置与部署(附图).doc
Windows下Resin的配置与部署.txtWindows下Resin的配置与部署.txtWindows下Resin的配置与部署.txt
resin服务器配置指南,实现resin服务均衡。前台服务均衡
对resin里的主要配置进行了一些解释说明,帮您更好的了解resin,配置resin
windows下resin多个版本的详细配置过程,通过实例详细介绍了resin的配置过程及部署过程
resin详细配置说明,包括resin的安装配置、使用方法等。
配置好openssl的resin4配置文件及loaclhost的证书(供测试用)
c)对 E:\sssssssss \resin\conf\resin.conf 文件进行配置 - 11 - d)80端口修改: - 16 - e)默认发布目录修改: - 16 - f)多虚拟主机: - 16 - g)多端口设置: - 17 - (3) Resin与Eclipse整合 - 17 - 2. Linux - 18 -...
为resin3 和eclipse的集成而努力
Resin.conf配置文件中文说明。 这是本人前期发布的一个资源, 当时不知怎么修改不了资源分, 现在不要资源分了。
resin3.0中的https配置
Apache + nginx + resin 详细配置
resin4.0配置文档,这是一个英文文档,供分享
最新的resin配置指导,新人少点弯路,下了就知道了 Main class: com.caucho.server.resion.Resin 这里多写了一个o 正确的是: Main class: com.caucho.server.resin.Resin
Windows下Resin的配置与部署(附图)
使用Resin3.0配置运行Java Servlet
Resin配置详解,具体的使用等
NULL 博文链接:https://zxymicky.iteye.com/blog/1163600
此文档可以帮助在eclipse下配置resin服务器。。