双击resin-2.1.9.zip,将它解压到D:\Resin-2.1.9(解压时不需要输入目录名),Resin是不需要安装的,所以解压后再进行相应的配置即可。———————————————————————————————————
用Dreamweaver打开resin-2.1.9\conf\resin.conf文件(用Dreamweaver打开是有原因的),查找到下面的内容:
<doc-dir>doc</doc-dir>
修改为: <doc-dir>D:/apache2/htdocs/</doc-dir>
说明:此为Resin运行JSP文件的目录,就是说JSP文件必须放在这个地方才能运行;———————————————————————————————————
再查找下面内容:
<http port='8080'/> 
修改为:<http port='7070'/> ,因为8080端口已经被Apache占用了,如果不修改这里,Apache和Resin将产生冲突而使另一方无法启动。———————————————————————————————————
打开Apache2\conf\httpd.conf文件,在最未端加入下面代码(不做这一步将无法运行jsp文件):
# Resin的结合配置部分:
LoadModule caucho_module "D:/resin-2.1.9/libexec/apache-2.0/mod_caucho.dll"
#上面的路径改成你自己的路径
<IfModule mod_caucho.c>
CauchoHost localhost 6802
AddHandler caucho-request jsp
<Location /servlet/*>
SetHandler caucho-request
</Location>
</IfModule> 设置了这么多内容,你一定有点烦了吧!不用急!!现在你已经完成了所有的配置了! 
———————————————————————————————————— 
接下来要测试运行JSP文件了,在此之前你要先启动Resin(Apache也要启动),双击运行Resin-2.1.9\bin\httpd.exe文件启动Resin。
然后在Apache2\htdocs\目录下新建一个叫test.jsp的文本文件,代码如下:
<%@ page language="java" contentType="text/html;charset=gb2312"%>
<%
out.print("我爱jsp!");
%> 

解决方案 »

  1.   

    <caucho.com>
     ...........
    <http-server>
     .......
    <host id='www1.chance.com.cn'>
      <app-dir>/www1/</app-dir>
        <web-app id='/'>
          <classpath id='WEB-INF/classes'
                     source='WEB-INF/src'
                     compile='true'/>
          <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>
          <path-mapping url-regexp='^/~([^/]*)' real-path='/home/$1/public_html/'/>
          <error-page error-code="403" location="/public/forbidden.jsp"/>
          <error-page error-code="404" location="/public/file_not_found.jsp"/>
        </web-app>
    </host><host id='www2.chance.com.cn'>
      <app-dir>/www2/</app-dir>
        <web-app id='/'>
          <classpath id='WEB-INF/classes'
                     source='WEB-INF/src'
                     compile='true'/>
          <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>
          <path-mapping url-regexp='^/~([^/]*)' real-path='/home/$1/public_html/'/>
      <servlet-mapping url-pattern='/servlets/*' servlet-name='invoker'/>
      <servlet-mapping url-pattern='*.xtp' servlet-name='com.caucho.jsp.XtpServlet'/>
      <servlet-mapping url-pattern='*.jsp' servlet-name='com.caucho.jsp.JspServlet'/>
            <error-page error-code="403" location="/error_page/forbidden.jsp"/>
            <error-page error-code="404" location="/error_page/file_not_found.jsp"/>
        </web-app>
    </host>
    .......
    </http-server>
    </caucho.com>
      

  2.   

    没有解释如何在IIS中配置问题啊!关注!
      

  3.   

    我也还不知道如何让多个JSP站点同时运行?期待。