resin报错问题归纳

关于Resin的问题:

1.       首先下载resin

2.       关注一下resin里的配置文件。(/ conf / resin.conf

要注意配置一下几个地方:

1.       端口问题,对于已有的Internet对口,或则Tomcat端口不要占用,我用的是90.

<!-- The http port -->

<http server-id="" host="*" port="90"/>

2.       虚拟路径关掉,对于本地程序,会在

<host id="" root-directory="D:/java/MyeclipseWorkspace/SMSS/WebRoot">里面配置。

而在这之后的

<web-app id="/" document-directory="什么也不填"/>否则会出 Directory of/提示。

3.       如果应用到JBPM则,在最后</host>之前加两句话

<system-property javax.xml.parsers.DocumentBuilderFactory

='org.apache.xerces.jaxp.DocumentBuilderFactoryImpl'/>

<system-property javax.xml.parsers.SAXParserFactory

='org.apache.xerces.jaxp.SAXParserFactoryImpl'/>

非常有用的resin配置:(转)

1.resin的默认端口

The Resin standalone web server starts listening to HTTP requests on port 8080 and listens

on port 6802 for any Apache or IIS plugin.

Resin默认开放的端口是8080,监听端口是6802.你可以在conf/resin.conf里修改属性

<!-- The http port -->
    <http server-id="" host="*" port="8080"/>

8080改成你需要的端口,但注意不能和已经开放服务的端口冲突,比如你已经开放了IIS服务,且端口是

80,则你就不能修改成80端口了.

<cluster>
      <srun server-id="" host="127.0.0.1" port="6802" index="1"/>
    </cluster>

6802改成你需要的端口.如果你用本机无法浏览,这里的host可以修改成你的对外ip,

2resin的主目录和虚拟目录

<server>
...
<host id=''>

<document-directory>doc</document-directory>
...     
</host>
默认主目录在resindoc目录,你可以修改成其他目录,甚至是其他盘,比如

E:/wwwroot,
你还可以增加新的应用程序目录(即虚拟目录),比如

<server>
...

<web-app id='/1/'>

<document-directory>/home/www/docs</document-directory>
...     
</web-app>

<web-app id='/2/'>

<document-directory>/home/www/slytherin</document-directory>
...     
</web-app>
这样设置后你就可以通过http://localhost:8080/1 http://localhost:8080/2

来访问/home/www/docs/home/www/slytherin

3resin禁止目录浏览
在以前的版本当中只要将directory-servlet设置为 “none”,就可以禁止目录浏览。
<web-app id='/'>
<directory-servlet id='false'/>
</web-app>
resin3.08下测试不行。在resin.conf下找到
<web-app-default>
...
<servlet servlet-name="directory"
           servlet-class="com.caucho.servlets.DirectoryServlet"/>
把它注释掉就好了。
<web-app-default>
...
<!-- disabled:
<servlet servlet-name="directory"
           servlet-class="com.caucho.servlets.DirectoryServlet"/>
-->

...
<servlet servlet-name="directory"
           servlet-class="com.caucho.servlets.DirectoryServlet"/>
把它注释掉就好了。

<web-app-default>
...
<!-- disabled:
<servlet servlet-name="directory"
           servlet-class="com.caucho.servlets.DirectoryServlet"/>
-->

4。如何在resin.conf中设置出错页? 基本命令是error-page。有3种出错页:
Error code pages, e.g. 404
Exception, e.g. java.lang.NullPointerException
connection failures, "can't connect to srun"

5。修改服务器的session
<web-app id='/'>
<session-config>
<!-- 2 hour timeout -->
<session-timeout>120</session-timeout>
<session-max>4096</session-max>
</session-config>
...
</web-app>

6。设置默认内容文档
conf/app-default.xml下修改

<welcome-file-list>
      <welcome-file>index.htm</welcome-file>
      <welcome-file>index.jsp</welcome-file>
    <welcome-file>index.html</welcome-file>
     <welcome-file>index.xtp</welcome-file>
</welcome-file-list>

访问顺序从上到下。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值