chenjiali 发表于 2017-2-20 09:41:23

resin报错问题归纳

http://blog.csdn.net/hongshan50/article/details/618300
  关于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-propertyjavax.xml.parsers.DocumentBuilderFactory
  ='org.apache.xerces.jaxp.DocumentBuilderFactoryImpl'/>
  <system-propertyjavax.xml.parsers.SAXParserFactory
  ='org.apache.xerces.jaxp.SAXParserFactoryImpl'/>
  非常有用的resin配置:(转)
  1.resin的默认端口
  The Resin standalone web server startslistening 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,
  2。resin的主目录和虚拟目录
  <server>
  ...
  <host id=''>
  <document-directory>doc</document-directory>
  ...
  </host>
  默认主目录在resin的doc目录,你可以修改成其他目录,甚至是其他盘,比如
  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。
  3。resin禁止目录浏览
  在以前的版本当中只要将directory-servlet设置为“none”,就可以禁止目录浏览。
  <web-app id='/'>
  <directory-servlet id='false'/>
  </web-app>
  在resin3.08下测试不行。在resin.conf下找到
  <web-app-default>
  ...
  <servletservlet-name="directory"
  servlet-class="com.caucho.servlets.DirectoryServlet"/>
  把它注释掉就好了。
  <web-app-default>
  ...
  <!-- disabled:
  <servletservlet-name="directory"
  servlet-class="com.caucho.servlets.DirectoryServlet"/>
  -->
  ...
  <servletservlet-name="directory"
  servlet-class="com.caucho.servlets.DirectoryServlet"/>
  把它注释掉就好了。
  <web-app-default>
  ...
  <!-- disabled:
  <servletservlet-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 tosrun"
  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>
  访问顺序从上到下。
页: [1]
查看完整版本: resin报错问题归纳