Integrated IIS and Tomcat

xiaoxiao2021-03-06  52

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, the next file involves the Tomcat path, please modify it to your own Tomcat path) Tomcat5 and IIS6 installation I will not say, there are many online documents, suppose we have installed Tomcat5 and IIS6. 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.logsize=1048576

# Replace all LocalHost and 8009 when you use it to your own IP and port [Channel. Socket: localhost: 8009] Port = 8009Host = localhost

# Define the worker [AJP13: localhost: 8009] channel = channel: 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 will not be possible at this time, then you should confirm the following: 1. Your "Internet Information Service Manager" -> "Website" -> "Default Website" -> "Properties" -> "ISAPI Filter" Is the JAKARTA be a top green arrow? If it is red, check if you have a configuration you have made or write something wrong, reconfigure it again 2. Configure it. Confirm that there is a TOOLS.jar file in your Tomcat installation directory ( Tomcat5 seems to be, but Tomcat4 is not in, online documents rarely mention this matter, causing me to configure fails multiple times), no words are copied from JDK's lib. 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, huh!) 4. English document also mentioned that IIS6 is set to IIS5 Isolation mode, "Internet Information Service Manager" -> "Website" -> "Properties" -> "Service", Took the "Run WWW service in IIS5.0 isolation mode". 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 conflamed many failures, some helplessness and annoyed) This article is actually equivalent to reprinting, I am just responsible for input, please point out if there is a mistake! Welcome to communicate with me, Ymer @ 21cn.com, JSP programmer, EJB learning ...

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

New Post(0)