resin报错问题归纳

    技术2025-07-23  23

    关于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)