Integration of IIS6 and Tomcat5

xiaoxiao2021-03-06  81

It took a long time and finally got IIS6 and Tomcat integration. Now put the steps out to give you a point, and it is also removed from the newcomer on Google and debugging once. let's start!

First, let me explain my system, Windows 2003 Server Chinese version IIS6 Tomcat5.0.14, JDK 1.4.2 installation directory is c: / jdk, Tomcat installation directory is C: / Tomcat, environment variable java_home and tomcat_home have set it well Point to its respective installation directories. (Note, please modify the Tomcat path in all files to your own Tomcat path)

I don't say Tomcat5 and IIS6 installation, there are many online documents. If we have installed Tomcat5 and IIS6 at this time, we can run independently. The default website of the two points to the C: / Web directory.

Now we have to do it to http://apache.linuxforum.net/dist/jakarta/tomcat-connectors/jk2/binaries/win32/jakarta-tomcat-connectors-jk2.0.2-win32-iis.zip to download JK2, Responsible for IIS and Tomcat from JK2, until ISAPI_Redirector2.dll, I put it under C: / Tomcat / IIS (directory casual).

Next, build a workers2.properties file in the CONF directory in the Tomcat installation directory, copy the following sect of Dongdong to save. Note that the path in File = ".." uses "/"!

[SHM]

File = c: /tomcat/logs/jk2.log

SIZE = 1048576

# Replace all localhost and 8009 to your own IP and port when you use it.

[Channel.socket: Localhost: 8009]

Port = 8009

Host = localhost

# Define the worker

[AJP13: Localhost: 8009]

Channel = CHANNEL.SOCKET: Localhost: 8009

# Uri mapping

[URI: / *. jsp]

[URI: / Web / *]

Worker = ajp13: Localhost: 8009

# Define the worker

[status: status]

# Uri mapping

[URI: / jkstatus / *]

Worker = status: status

After editing the JK2.Properties file, confirm this:

Request.tomcatauthentication = false

Next start Editing the registry, build an IIS.REG file directly, copy the following to save it and then double-click IIS.REG to import the information into the registry. (Note, change the Tomcat path involved into your Tomcat's path)

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE / SOFTWARE / APACHE SOFTWARE FOUNDATION / JAKARTA ISAPI Redirector / 2.0]

"ServerRoot" = "c: // Tomcat"

"eXtensionuri" = "/ jakarta / isapi_redirector2.dll"

"workersfile" = "c: //tomcat//conf//Workers2.properties"

"Loglevel" = "info"

Then open "My Computer -> Control Panel -> Administrative Tools -> Internet Information Service Manager", select the default website in "Website" (the default website I assume points to C: / Web), right-click on it Select "Properties", select "ISAPI Filter" in the pop-up page box, click "Add", filter name to fill in Jakarta, and fill in your ISAPI_Redirector2.dll in the executable. After the "OK", "OK" is "OK" to close the property page. Right click on the "default website", select "New" -> "Virtual Directory", unfill jakarta, the next step, the path is selected as your isapi_redirector2.dll stored, I am C: / Tomcat / IIS, under One step, the permissions remember to hook "execution" that kind of tick, well, complete.

If you use IIS5, you can end here, but IIS6 is not finished, continue.

On the "Web Service Extensions" in the "Internet Information Service Manager" "Web Service Extensions", right-click "Add a new web service extension", the extension of the pop-up box fills Tomcat (in fact, it doesn't matter), "requires File "Add" and "OK" after finding your isapi_redirector2.dll. "Setting the extended state to allow" also hook, determine.

Ok, configure it. Now let's start Tomcat5, then Net Start W3SVC starts IIS6. Type http: // localhost: 8080 / hello.jsp (this file is I put it under C: / Web) Take a look! Then look at http://localhost/hello.jsp, if the results are executed, congratulations, the integration is successful!

But maybe it is not good at this time, then you should confirm the following points:

1. Your "Internet Information Service Manager" -> "Website" -> "Default Website" -> "Properties" -> "Isapi Filter" is a top green arrow? If it is red, check if your configuration you have made is less or write something wrong, reconfigure it again.

2. Confirm that there is a TOOLS.jar file in your Tomcat installation directory (Tomcat5 seems to be there, but Tomcat4 is not available, online documents rarely mention this, cause me many times The configuration failed), no, disconnected from the LIB of JDK.

3. The directory points to the directory is best consistent with the directory points to Tomcat, otherwise the problem of not finding images and other resource files will occur. (This does not affect execution, huh,!)

4. In English documentation, it is mentioned that IIS6 is set to IIS5 Isolation mode, "Internet Information Service Manager" -> "Website" -> "Properties" -> "Services", "Serving" WWW in IIS5.0 Isolation mode) Service "hook. But I can use it normally if you are not successful. You can try this.

Not good? Ok, let's come, turn on the chassis, remove the hard drive, throw it on the ground, step on, step on it! See you still dare to talk to me ^ _ ^ (a joke, but before I configured many failures, I really helpless and annoyed)

This article is actually equivalent to reprinting, I am just responsible for input, if there is a mistake, please point out! Welcome to communicate with me, Ymer @ 21cn.com, JSP programmer, EJB learning ...

转载请注明原文地址:https://www.9cbs.com/read-121556.html

New Post(0)