iis和tomcat结合使用,让IIS发布的应用也能访问到JSP

转载 2007年10月10日 10:23:00

最近因为结合客户端要对服务端做些配置,查了一些资料,下面老外写的IIS和TOMCAT结合使用的方法挺不错的,如果大家有用得到的可以看看,最后面有原始的连接地址。

 

Tomcat and IIS Installation process (jk2).


This would be my way of configuring the JK2 redirector to work as quickly and simple as possible.

First of all, download the component needed to do the connection isapi_redirector2.dll
Note : replace $tomcat_home with your tomcat installation directory, e.g. "C:/jakarta-tomcat-4.1.24".

Now, create the workers2.properties file where you define the worker "main".

[shm]
file=$tomcat_home/logs/jk2.log
size=1048576

# Example socket channel, override port and host.
[channel.socket:reynir_net:8009]
port=8009
host=127.0.0.1

# define the worker
[ajp13:reynir_net:8009]
channel=channel.socket:reynir_net:8009

# Uri mapping
[uri:/*.jsp]
[uri:/web/*]
[uri:/view/*]
worker=ajp13:reynir_net:8009

# define the worker
[status:status]

# Uri mapping
[uri:/jkstatus/*]
worker=status:status

 


Save this file into c:/$tomcat_home/conf/workers2.properties
You will also need jk2.properties, the only line I've got in my file is like this :

request.tomcatAuthentication=false

 

This line is to make IIS take care of authentication, rather than tomcat.
You can also set up an realm in tomcat and this value true and tomcat will take care of http authentication.
Save this file into c:/$tomcat_home/conf/jk2.properties

You need to create a registry mergable file such as the one below , and merge it into the registry.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE/SOFTWARE/Apache Software Foundation/Jakarta Isapi Redirector/2.0]
"serverRoot"="$tomcat_home"
"extensionUri"="/jakarta/isapi_redirector2.dll"
"workersFile"="$tomcat_home//conf//workers2.properties"
"logLevel"="DEBUG"

 

You must be sure these values are correctly spelled, and you must check if these files exist. Ok, now you must open the Internet Information Server Management Console, accessable through:
- [start]->settings->control panel->Administrative tools->Internet Services Manager
Select the Host you are working with.
"Right click" it and open it's properties dialog.
Select the ISAPI Filters tab.
Click Add
type in filtername : jakarta
type in Executable : $tomcat_home/conf/connector/isapi_redirector2.dll (or browse to it).

click OK.
Next create a new virtual directory, named jakarta. It's "Local path" should be C:/$tomcat_home/conf/connector
Now, open the services dialog (from control panel-> administrative tools -> services).
restart the "World Wide Web Publishing Service".
now go back to the Internet service manager, and check if the arrow in the ISAPI Filter dialog has turned green.
If it has not turned green one or more of the paths in the registry-file you merged to the registry (in above step) is incorrect.
You must run regedit (from start -> run -> regedit) and browse to HKEY_LOCAL_MACHINE/SOFTWARE/Apache Software Foundation/Jakarta Isapi Redirector/2.0.
Now review the paths, the redirector not finding the configuration files is the only reason for a red arrow.

Problems that have occured, are not big, probably the biggest is the fact that I've never got any errors or debug info in the logfile.  

 

 

The original URL:  http://www.reynir.net/tomcat/tomcat_IIS_service_jk2.html

IIS+tomcat6.0+jk 配置参考

就像以前在IIS上配rubyonrails的运行环境一样,这次配IIS+tomcat同样头痛了一番,感到最痛苦的是配置过程中遇到问题往往得不到太多帮助,只能自己一遍遍检查。所以配完了决定好好写篇东西,...
  • fleey
  • fleey
  • 2008-07-20 15:27:00
  • 1328

apache 与tomcat.iis之间的整合

2005-09-14windows下apache、tomcat、iis整合 - []Tag: web apache Tomcat IIS 1、修改Apache配置文件。LoadModule proxy...
  • zhuangwei517
  • zhuangwei517
  • 2007-11-06 08:53:00
  • 403

IIS设置可以让本地局域网访问

一般的,我们用IIS只能访问本机发布的网站,但是我们如果想要让其他的局域网也可以访问我们发布的网站,这样一来我们就需要进行一些设置才可以让本局域网段的其他主机进行访问,首先需要把本地的防火墙给关掉,然...
  • Sky_Cat
  • Sky_Cat
  • 2012-06-02 11:48:03
  • 4029

让 IIS 支持 JSP

 在涉入WEB应用程序开发之初我就对IIS比较好奇:为什么它支持HTML,HTM却一会儿可是是.asp,一会儿可以是.aspx,而且还可以是.asmx.所在就找了本书了解了一下.真是不看不知道,一看全...
  • tianjh
  • tianjh
  • 2007-07-11 17:37:00
  • 2251

整合了tomcat+apache+IIS6

下载jk放到apache/modules下,修改apache/conf下配置文件httpd.conf在末尾增加虚拟目录配置,加载jk配置; 整合IIS和apache,共用80端口冲突,修改iis端口,...
  • ilix
  • ilix
  • 2007-03-07 10:26:00
  • 393

windows下Nginx与tomcat组合简单使用

文章版权由作者李晓晖和博客园共有,若转载请于明显处标明出处:http://www.cnblogs.com/naaoveGIS/ 1.背景 项目中瓦片资源越来越多,如果提高瓦片的访问效率是一个需要解决的...
  • elementf
  • elementf
  • 2017-05-25 08:47:59
  • 1864

WindowsServer/XP/7环境下IIS整合tomcat使得IIS支持jsp完整教程

1.WindowsServer2003/XP系统下iis6和tomcat6的整合。 2.WindowsServer2003/XP系统下iis6和tomcat6的整合。...
  • jdfkldjlkjdl
  • jdfkldjlkjdl
  • 2014-10-13 21:38:32
  • 3421

IIS+JSP

刚JSTOP问我IIS上是否可运行jsp,答案是可以的,只是方案有不同,如果用resin,那很简单了,最新版3.08,如果用tomcat,配置比较烦,我只配置成功一次,现在也不愿多说了,只发一下有关的...
  • support_best
  • support_best
  • 2015-01-21 14:36:59
  • 2322

框架组合

我心目中最好的框架组合是:    表示层:spring mvc 3.1 + annotation    控制层:spring 3.1    持久层:hibernate 3.6 +jdbcTemp...
  • oLeiChang
  • oLeiChang
  • 2016-01-28 16:47:50
  • 294

windows下Nginx与tomcat组合

1.背景项目中瓦片资源越来越多,如果提高瓦片的访问效率是一个需要解决的问题。这里,我们考虑使用Nginx来代理静态资源进行初步解决。2.Nginx简介Nginx ("engine x&quo...
  • u012472945
  • u012472945
  • 2018-03-09 16:31:46
  • 6
收藏助手
不良信息举报
您举报文章:iis和tomcat结合使用,让IIS发布的应用也能访问到JSP
举报原因:
原因补充:

(最多只允许输入30个字)