Experience of integrating iis5 and tomcat5 with JK2 in Win32 environment

This article assumes that iis5 and tomcat5 have been installed JK2 download address:

http://apache.linuxforum.net/dist/jakarta/tomcat-connectors/jk2/binaries/win32/jakarta-tomcat-connectors-jk2.0.4-win32-IIS.zip

It comes with install4iis JS is generally not easy to use and needs to be configured manually

1 JK2 Properties and workers 2 Put the two properties files under ${tomcat_home} / conf,

Including JK2 All properties are commented out by default. It doesn't matter. Just use the default downloaded (you can also)

Add the following line, request Tomcatauthentication = false, I don't know the specific function

workers2. Properties should include at least the following three parts:

[shm:]

info=scoreboard. required for reconfiguration and status with multiprocess servers

file=E:Program FilesApache Software FoundationTomcat 5.0 empjk2. 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-examples/*]

In the first part, it doesn't matter to use "/" or "/" for the file name and path under windows (unlike some statements on the Internet)

The second part is just a description, which means that JK2 works with port 8009

The third part is a URI mapping table. Write the path to be interpreted with Tomcat according to the example, and add it yourself if necessary.

2 ISAPI downloaded to_ redirector2. The location of DLL files can be arbitrary, but it is best to establish a special directory under ${tomcat_home}, and the directory name is only used in the following two places.

First, create a virtual directory called Jakarta in iis5, which must specify the permission of "execution", that is, the directory containing the file ISAPI_ redirector2. DLL directory.

Second, in the "ISAPI filter" tab of the web site properties, add an item with a random name (such as Tomcat), and the executable file also points to isapi_redirector2.dll. (omitted)

3 manually create a registry import file, such as JK2 Reg, the content shall at least include the following contents:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINESOFTWAREApache Software FoundationJakarta Isapi Redirector2.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 keys need to be changed. The ${tomcat_home} I use here is "E: \ program files \ Apache Software Foundation \ Tomcat 5.0 \"

After modification, double-click to import the registry. The role of this registry information should be provided by ISAPI_ redirector2. DLL to read some initialization parameters.

4 restart iis5 and tomcat5. You should see the item just added in the "ISAPI filter" tab in the web site properties of IIS, with a green arrow in front, and the priority is high. That's it.

To sum up, you only need ISAPI_ redirector2. DLL a file, other JK2 properties,workers2. properties,jk2. Reg can be built by themselves.

Test method:

open http://localhost:8080/jsp -Examples /, which should be accessible normally (through tomcat5)

Delete the port number to become http://localhost/jsp-examples/ And can be accessed normally (through iis5)

5 if something goes wrong, check the following possibilities:

*Do you write the letters wrong, such as I wrote Jakarta as Jarkata

*Whether the item in the "ISAPI filter" tab in the web site properties of IIS is green and has high priority indicates that it has been loaded. If not, try to restart the web service, and sometimes you may need to restart the computer

*Check Java in system parameters_ Home and Tomcat_ Is home set correctly

* isapi_ redirector2. DLL writes the error message to the application log of the system. This usually occurs because of the registry JK2 Reg is not set correctly, so it cannot be initialized

*Some machines may 808009 these ports have been occupied. You can close the occupied program or change the default port. (stop IIS and Tomcat services first, and use the netstat – an command to see which ports are occupied)

(thanks to the efforts of peers who have explored this integration before. This article is a summary of personal experience. Please indicate the source for reprint)

yanqlv 2004/09/24

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>