`
mywebcode
  • 浏览: 1001255 次
文章分类
社区版块
存档分类
最新评论

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】,发现多了几项
    • nBonCode-Tomcat-CFC-Handler:这个Handler是处理cfc文件的,将cfc的后缀链接转发给Tomcat。
    • nBonCode-Tomcat-CFM-Handler:这个Handler是处理cfm文件的
    • nBonCode-Tomcat-JSP-Handler:这个Handler是处理jsp文件的。
    • nBonCode-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,beforeyou 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



分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics