用resin使IIS支持jsp和servlet的步骤介绍

IISWEB以其管理操作简单和对ASP的支持而受不少人的喜欢。这里介绍怎么用resin使IIS支持jsp和servlet。

一、分别安装配置iis和resin1.1使各自都单独能正常运行。iis和resin1.1的安装后路径如下:c:apache和c:esin1.1。

二、配置IIS

1、拷贝iis_srun.dll到IISscripts目录"c:inetpubscripts";

2、在c:inetpubscripts目录下创建配置文件(resin.ini)用于指定resin的配置文件的位置。

resin.ini内容如下:

CauchoConfigFilec:/resin1.1/conf/resin.conf

三、配置resin

<caucho.com>

<http-serverapp-dir=C:Inetpubwwwroot>

<servlet-mappingrl-pattern=/servlets/*servlet-name=invoker/>

<servlet-mappingrl-pattern=*.xtpervlet-name=com.caucho.jsp.XtpServlet/>

<servlet-mappingrl-pattern=*.jspservlet-name=com.caucho.jsp.JspServlet/>

</caucho.com>

四、测试

1、运行IIS,启动resin的jsp引擎(运行c:esin1.1insrun.exe)

2、把一个jsp文件(test.jsp)放入IIS的C:Inetpubwwwroot目录下.FTP

test.jsp如下:

<%@pagelanguage=java?>

2+2=<%=2+2%>

浏览https://localhost:port/test.jsp。你将看到:2+2=4<——这个结果

注:port为端口号,调试环境nt4.0+iis+resin1.1

猜你喜欢

转载自www.cnblogs.com/03ngnntds/p/10323188.html