IIS7 + Tomcat7 整合共用80端口

最近项目需要,要在将JSP项目集成到80端口,但是80端口已运行了一个项目,所有只有将tomcat集成进IIS。在google,baidu搜索看了需要博客,说法都大同小异,都是用这种方法:http://wenku.baidu.com/view/133615d5240c844769eaee5f我意外翻墙发现个视频,安装一个exe文件,就可以将 IIS 和 tomcat 整合起来,超级简单,相比于以上链接里的修改注册表,下载dll等等配置来说简单很多。我已将youtube视频下载然后上传到youku了,视频链接http://v.youku.com/v_show/id_XNTg1MTgyODgw.html 详情请看视频。

在此做个简单笔记。


预备工作

l  确定IIS和Tomcat能够独立运行。

l  到http://tomcatiis.riaforge.org/上下载连接器,目前的版本是AJP13_V1016。

 

详细步骤

  • l  运行Tomcat。
  • l  在IIS新建一个网站为TomcatSites,将其工作目录设为Tomcat_Dir/webapps
  • l  解压AJP,安装其中的 Connector_Setup.exe
    • n  在【select All(Global) or Specific Option】这一步选择【let me choose specific sites-……】。如图:

    • n  接下来再选择TomcatSites。
    • n  在【Select handler Mapping】这一步。如果需要访问Servlet时,就要勾选【Servlet (add a wildcard referece ……】;否则就用默认设置就可以了。

  • l  查看IIS中TomcatSites网站的变化。进入【Handler Mapping】,发现多了几项
    • n  BonCode-Tomcat-CFC-Handler:这个Handler是处理cfc文件的,将cfc的后缀链接转发给Tomcat。
    • n  BonCode-Tomcat-CFM-Handler:这个Handler是处理cfm文件的
    • n  BonCode-Tomcat-JSP-Handler:这个Handler是处理jsp文件的。
    • n  BonCode-Tomcat-WC-Handler:这一项只有在安装AJP勾选了Servlet才会有的,它负责将其他转发给Tomcat,只有就可以实现Tomcat处理Servlet了。
  • l  安装完AJP后,迫不及待的输入localhost,成功出现Tomcat的首页。

 

后记

         这个方法我之前成功过一次,后来在另一台机器再试的时候老是失败,提示类似于以下错误 :

Error Message:

HTTP Error 500.21 - Internal Server Error

Handler "BonCode-Tomcat-CFM-Handler" has a bad module "ManagedPipelineHandler" in its module list.


后来在官方文档上找到原因和解决方案:

http://boncode.net/connector/webdocs/Tomcat_Connector.htm

 

SEVERAL ORIGINS ON THIS ERROR:

i)

You are not able to retrieve mapped extensions from IIS7.

You may not have installed the “.net extensibility” for IIS7. See above for instructions or use the Server Manager GUI to install this IIS7 feature.

 

ii)

You have installed a later version of the .net framework, for example .net version 4.0, before you installed the connector and .net version 3.51. If you also have ISAPI role features enabled, you may have created a conflict to resolve.

To keep using ISAPI and .net version 4:

a) Re-register asp.net under the correct .net version, run command:

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -i

b) Switch the Application pool connected to your site to “integrated mode” and the .net version 4

 

iii)

Conflict with existing .net framework setup and ISAPI Filters and ISAPI Extensions Role Sub service.

If you do not need ISAPI support (the connector does not need this with .net 3.5.1), you can remove ISAPI extensions and filters.

Remove: ISAPI Extension, ISAPI Filter support

 

iv) Conflict between .net frameworks installed. If you do not use .net 4:

a) uninstall .net 4,

b) uninstall .net 3.51,

c) then, rerun the connector installer



评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值