用于与IIS整合的resin是resin3.16版本,配置文件resin.conf原网站1的resin是resin3.018,配置文件resin1.conf原网站2的resin是resin版本不知道,配置文件resin2.conf这两个网站使用安装包里的resin均能正常配置.由于我用的与IIS整的resin是resin3.16, 所以要求将resin1.conf和resin2.conf这两个网站的配置文件合并在resin.conf里(我直接复制在resin.conf里,结果httpd.exe提示有未定义的标记),请朋友帮帮.<-----------------------------resin.conf--------这个是resin.3.16,用来和IIS整合的-------------->
<!--
   - Resin 3.1 configuration file.
  -->
<resin xmlns="http://caucho.com/ns/resin" xmlns:resin="http://caucho.com/ns/resin/core">
  <class-loader>
    <tree-loader path="${resin.home}/ext-lib"/>
    <tree-loader path="${resin.root}/ext-lib"/>
    <tree-loader path="${resin.home}/lib"/>
    <tree-loader path="${resin.root}/lib"/>
  </class-loader>  <management path="${resin.root}/admin">
    <user name="admin" password="password" disable="true"/>
    <resin:if test="${resin.professional}">
      <deploy-service/>
      <jmx-service/>
      <log-service/>
      <xa-log-service/>
    </resin:if>
  </management>  <log name="" level="info" path="stdout:" timestamp="[%H:%M:%S.%s] {%{thread}} "/>
  <logger name="com.caucho" level="info"/>
  <logger name="com.caucho.java" level="config"/>
  <logger name="com.caucho.loader" level="config"/>  <dependency-check-interval>2s</dependency-check-interval>
  <system-property mail.smtp.host="127.0.0.1"/>
  <system-property mail.smtp.port="25"/>
    <javac compiler="internal" args="-source 1.5"/>
      <cluster id="app-tier">
        <root-directory>.</root-directory>
   <server-default>
      <http address="*" port="9999"/>
      <jvm-arg>-Xmx256m</jvm-arg>
      <jvm-arg>-Xss1m</jvm-arg>
      <jvm-arg>-Xdebug</jvm-arg>
      <jvm-arg>-Dcom.sun.management.jmxremote</jvm-arg>
      <watchdog-jvm-arg>-Dcom.sun.management.jmxremote</watchdog-jvm-arg>
      <watchdog-port>6600</watchdog-port>
      <memory-free-min>1M</memory-free-min>
      <thread-max>256</thread-max>
      <socket-timeout>65s</socket-timeout>
      <keepalive-max>128</keepalive-max>
      <keepalive-timeout>15s</keepalive-timeout>
   </server-default>
    
    <server id="" address="127.0.0.1" port="6800"/>
    <resin:if test="${resin.professional}">
      <persistent-store type="cluster">
        <init path="session"/>
      </persistent-store>
    </resin:if>
    
    <resin:if test="${resin.professional}">
     <cache path="cache" memory-size="64M">
        <rewrite-vary-as-private/>
      </cache>
    </resin:if>
    
    <resin:if test="${resin.professional}">
      <ping></ping>
    </resin:if>
    
    <web-app-default>
       <prologue>
        <class-loader>
          <tree-loader path="${resin.root}/ext-webapp-lib"/>
        </class-loader>
        <allow-servlet-el/>
       </prologue>
      <cache-mapping url-pattern="/" expires="5s"/>
      <cache-mapping url-pattern="*.gif" expires="60s"/>
      <cache-mapping url-pattern="*.jpg" expires="60s"/>
      <cache-mapping url-pattern="*.png" expires="60s"/>
      <session-config>
        <enable-url-rewriting>false</enable-url-rewriting>
      </session-config>
        <jsp>
          <validate-taglib-schema>true</validate-taglib-schema>
          <fast-jstl>true</fast-jstl>
          <fast-jsf>false</fast-jsf>
        </jsp>
    </web-app-default>    
    <resin:import path="${resin.home}/conf/app-default.xml"/>
    <host-default>
    <access-log path="logs/access.log" format='%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-Agent}i"' rollover-period="1W"/>
      <web-app-deploy path="webapps"/>
       <ear-deploy path="deploy">
        <ear-default>
         <ejb-server>
            <config-directory>WEB-INF</config-directory>
         </ejb-server>
        </ear-default>
      </ear-deploy>
      <resource-deploy path="deploy"/>
    </host-default>    <host-deploy path="hosts">
      <host-default>
        <resin:import path="host.xml" optional="true"/>
      </host-default>
    </host-deploy>
    
    <host id="" root-directory=".">
      <web-app id="/" root-directory="webapps/ROOT"/>
      <web-app id="/resin-admin" root-directory="${resin.home}/php/admin">
        <prologue>
          <resin:set var="resin_admin_external" value="false"/>
          <resin:set var="resin_admin_insecure" value="true"/>
        </prologue>
      </web-app>
      <!-- 网站1 -->  **************请在下面帮帮我, 帮我把resin1.conf内容配置在下面
      <web-app id="web1" root-directory="D:\SFM-Web\web1">
      </web-app>      <!-- 网站2 -->  **************请在下面帮帮我, 帮我把resin2.conf内容配置在下面
      <web-app id="web2" root-directory="D:\SFM-Web\web2">
      </web-app>    </host>
  </cluster>
  
  <resin:if test="${resin.professional}">
    <cluster id="web-tier">
      <server-default>
       <http address="*" port="9080"/>
      </server-default>
      <server id="web-a" address="127.0.0.1" port="6700"/>
      <cache path="cache" memory-size="64M"/>
      <host id="">
        <web-app id="/">
           <rewrite-dispatch>
             <load-balance regexp="" cluster="app-tier"/>
           </rewrite-dispatch>
        </web-app>
      </host>
    </cluster>
  </resin:if>
</resin>
***************未完待序,    稍候贴出resin1.conf和resin2.conf

解决方案 »

  1.   

    <------------------resin1.conf----这个是网站1的------------->
    <resin xmlns="http://caucho.com/ns/resin"
           xmlns:resin="http://caucho.com/ns/resin/core">
      <log name="" level="info" path="stdout:" timestamp="[%H:%M:%S.%s] "/>
      <log name="com.caucho.java" level="config" path="stdout:"
           timestamp="[%H:%M:%S.%s] "/>
      <log name="com.caucho.loader" level="config" path="stdout:"
           timestamp="[%H:%M:%S.%s] "/>  <dependency-check-interval>2s</dependency-check-interval>
      <javac compiler="internal" args=""/>
      <thread-pool>
        <thread-max>1500</thread-max>
        <spare-thread-min>25</spare-thread-min>
      </thread-pool>
      <min-free-memory>1M</min-free-memory>
      <server>
        <class-loader>
          <tree-loader path="${resin.home}/lib"/>
          <tree-loader path="${server.root}/lib"/>
        </class-loader>
        <keepalive-max>500</keepalive-max>
        <keepalive-timeout>120s</keepalive-timeout> <!--   <http server-id="" host="*" port="80"/>-->    <cluster>
          <srun server-id="" host="127.0.0.1" port="6802"/>
        </cluster>    <resin:if test="${resin.isProfessional()}">
          <persistent-store type="cluster">
            <init path="session"/>
          </persistent-store>
        </resin:if>
        <ignore-client-disconnect>false</ignore-client-disconnect>
        <resin:if test="${isResinProfessional}">
          <cache path="cache" memory-size="8M"/>
        </resin:if>
        <resin:if test="${isResinProfessional}">
          <ping>
            <!-- <url>http://localhost:8080/test-ping.jsp</url> -->
          </ping>
        </resin:if>
        <web-app-default>
          <class-loader>
            <tree-loader path="${server.root}/ext-webapp"/>
          </class-loader>
          <cache-mapping url-pattern="/" expires="5s"/>
          <cache-mapping url-pattern="*.gif" expires="60s"/>
          <cache-mapping url-pattern="*.jpg" expires="60s"/>
          <servlet servlet-name="directory"
                  servlet-class="com.caucho.servlets.DirectoryServlet"/>
          <resin:if test="${java.isJava5()}">
            <servlet servlet-name="resin-php"
                     servlet-class="com.caucho.quercus.servlet.QuercusServlet">
              <init>
              </init>
            </servlet>        <servlet-mapping url-pattern="*.php" servlet-name="resin-php"/>
         </resin:if>
          <allow-servlet-el/>
          <session-config>
            <enable-url-rewriting>true</enable-url-rewriting>
          </session-config>
        </web-app-default>    <host-default>
          <class-loader>
            <compiling-loader path="webapps/WEB-INF/classes"/>
            <library-loader path="webapps/WEB-INF/lib"/>
          </class-loader>
          <access-log path="logs/access.log" 
                format='%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-Agent}i"'
                rollover-period="1W"/>
          <web-app-deploy path="webapps"/>
          <ear-deploy path="deploy">
            <ear-default>
            </ear-default>
          </ear-deploy>
          <resource-deploy path="deploy"/>
          <web-app-deploy path="deploy"/>
        </host-default>
        <resin:import path="${resinHome}/conf/app-default.xml"/>
        <host-deploy path="hosts">
          <host-default>
            <resin:import path="host.xml" optional="true"/>
          </host-default>
        </host-deploy>
        <host id="www.xxx.com" root-directory="D:\SFM-WEB\web1">
          <web-app id="/" document-directory="."/>
        </host>
      </server>
    </resin><***************   resin2.conf *********这个是网站2的 ***********><caucho.com><java compiler="internal" compiler-args="" work-dir='D:\SFM-WEB\web2\jspwork'/>
    <jsp precompile='true' static-encoding='true'/><http-server>
      <caucho-status>false</caucho-status>  <srun host='127.0.0.1' port='6802'/>
      
      <thread-max>500</thread-max>  <thread-keepalive id='100'/>
      <request-timeout id='30s'/>
      <accept-buffer-size id='256'/>
      <thread-min id='5'/>
      <!-- cache dir='cache' size='1024' entries='8192'/ -->
      <host id=''>
        <app-dir>D:\SFM-WEB\web2</app-dir>    <web-app id='/'>
          <class-update-interval id='2'/>
          <classpath id='classbean'/>
          <cache-mapping url-pattern='/' expires='2s'/>
          <session-config>
            <session-max>4096</session-max>
            <session-timeout>30</session-timeout>
            <enable-cookies>true</enable-cookies>
            <enable-url-rewriting>true</enable-url-rewriting>        <file-store>sessions</file-store>
          </session-config>
          <servlet-mapping url-pattern='/myweb2/*' servlet-name='invoker'/>
          <servlet-mapping url-pattern='*.jsp'
                           servlet-name='com.caucho.jsp.JspServlet'/>      <servlet servlet-name='InitServer' servlet-class='www.general.InitServer'>
    <init-param serverName='web2'/>
    <load-on-startup/>
          </servlet> <directory-servlet id='false'/>
        </web-app>
      </host>  
    </http-server>
    </caucho.com>