In the Win32 environment, IIS5 and Tomcat5 use JK2 integrated integrated experience
This article assumes that IIS5 and Tomcat5.jk2 download addresses have been installed:
http://apache.linuxforum.net/dist/jakarta/tomcat-connectors/jk2/binaries/win32/jakarta-tomcat-connectors-jk2.0.4-win32-iis.zip
It is not very easy to use in install4iis.js in it, and it needs to be manually configured.
1 Put the jk2.properties and workers2.properties two files to $ {tomcat_home} / confs
Among them, all JK2.Properties is all commented by default, and it doesn't matter, you will use the downloaded default.
Plus the following line, request.tomcatauthentication = false, I don't know very well
Workers2.properties should be aware of at least three parts:
[shm:]
INFO = Scoreboard. Required for reconfiguration and status with multiprocess Servers
FILE = E: / Program Files / Apache Software Foundation / Tomcat 5.0 / Temp / jk2.shm
SIZE = 1048576
[Channel.socket: Localhost: 8009]
INFO = ajp13 forwarding over socket
Tomcatid = localhost: 8009
# Map Webapps to The Web Server Uri Space
[URI: / JSP-Examples / *]
[URI: / servlets-example / *]
The first part of the file name path under Windows uses "/" or "/", it doesn't matter (not just like online)
The second part can be written, which means that the JK2 is working with port 8009.
The third part is a URI mapping table, and the path to explain with Tomcat is written according to the example, and you can add it if you need it.
2 Download the location of the ISAPI_Redirector2.dll file can be arbitrarily, but it is best to establish a directory in $ {Tomcat_home}, which is only used in both below.
First, establish a virtual directory jakarta in IIS5, which must specify "execution" permissions, which is the directory containing file isapi_redirector2.dll.
Second, in the "ISAPI Filter" tab in the Web site property, add one, the name is just (such as Tomcat), the executable is also pointing to isapi_redirector2.dll. (图 略)
3 Hand working to establish a registry import file, as named JK2.REG, the content should be included in the following:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE / SOFTWARE / APACHE SOFTWARE FOUNDATION / JAKARTA ISAPI Redirector / 2.0]
"workersfile" = "E: // program files // apache software Foundation // Tomcat 5.0 // conf //Workers2.properties"
"eXtensionuri" = "/ jakarta / isapi_redirector2.dll"
"loglevel" = "info" "Serverroot" = "E: // program files // apache software Foundation // Tomcat 5.0 //"
Here only the WorkersFile and ServerRoot key value need to be changed, I use $ {tomcat_home} here is "E: // Program files // Apache Software Foundation // Tomcat 5.0 //"
After passing the double-click to import the registry. The role of these registry information should be some initialization parameters read by Isapi_Redirector2.dll.
4 Repeat IIS5, recover Tomcat5, should see the project just joined in the "ISAPI Filter" tab in IIS's Web site properties, and there is a green arrow in front, the priority is high. This is successful.
Summarize, in fact, only isapi_redirector2.dll a file, other jk2.properties, workers2.properties, JK2.REG can be built by yourself.
testing method:
Open http: // localhost: 8080 / jsp-example /, you should access it normally (through Tomcat5)
Delete the port number, which becomes http: // localhost / jsp-example /, and also access (via IIS5).
5 If there is a problem, check the following might:
* Whether to write the alphabet, such as I wrote Jakarta into Jarkata
* IIS's Web Site Properties is green, and high priority, indicating that it has been loaded, if not, try recovering the web service, sometimes you may need to restart your computer
* Check if java_home and tomcat_home are set correctly in system parameters
* isapi_redirector2.dll writes the error message to the system's application log, which is generally because the registry JK2.REG is not set, causing an uninteremered.
* Some machines may be 80, 8080, 8009 These ports have been occupied, and the occupied programs can be turned off, or the method of changing the default port is resolved. (To stop the IIS, Tomcat service, you can see which ports are occupied (thank you for your efforts, this article is a summary of personal experience, reproduced please indicate the source) YANQLV2004 / 09/24