This configuration is in the following environment:
Windows Server 2003 + tomcat5.028 + iis6.0
1. Preparations
1) Make sure that IIS and tomcat are correctly held and that my tomcat is installed in D:/tomcat 5.0;
2) download the isapi_redirector2.dll file, which can be placed in any directory. This time, it is placed in the D:/000 folder;
3) create a file workers2.properties in the Directory D:/tomcat 5.0/conf and enter the following content:
[SHM]
File = D:/tomcat 5.0/logs/jk2.log
Size = 1048576
# Example socket channel, override port and host.
[Channel. Socket: localhost: 8009]
Port = 8009
Host = 127.0.0.1
# Define the worker
[Ajp13: reynir_net: 8009]
Channel = channel. Socket: localhost: 8009
# URI Mapping
[URI:/*. jsp]
[URI:/web/*]
[URI:/View/*]
Worker = ajp13: localhost: 8009
# Define the worker
[Status: Status]
# URI Mapping
[URI:/jkstatus/*]
Worker = Status: Status
4) Add the following sentence to the file jk2.properties in D:/tomcat 5.0/conf:
Request. tomcatauthentication = false
5) register in the registry
Add a new item to the registry:
[HKEY_LOCAL_MACHINE/software/Apache Software Foundation/Jakarta ISAPI redirector/2.0]
Add four string values to this item:
Key name: serverroot; key value: D:/tomcat 5.0
Key name: extensionuri/Jakarta/isapi_redirector2.dll
Key name workersfile key value D:/tomcat 5.0/conf // workers2.properties
Key name loglevel key value debug
2. Integrate Tomcat into IIS
Open the IIS manager and make sure that the website to be published has been configured in IIS. That is, you can browse the ASP page.
This release is a dfg project.
1) Open the properties of the dfg project and select the ISAPI filter? Add
Filter Name: Jakarta
Executable File: D:/000/isapi_redirector2.dll
OK.
2) Select the home directory for the dfg project attribute?
Local path: H:/dfg (directory of the publishing website)
(Note: The local path can be directly set to D:/tomcat 5.0/webapps, or to any directory. set to D:/tomcat 5.0/webapps. You do not need to modify the server. XML content, but all published websites will be placed under webapps; if it is set to an external site, it will be placed on the server. in XML. in short, to integrate Tomcat into IIS, let Tomcat know the IIS publishing directory .)
Click "Configure "?" Add"
Executable File: D:/000/isapi_redirector2.dll
Extension:. jsp
OK
3) create a virtual directory named jakerta in dfg and map the path to D:/000/
Execution permission: scripts and executable files
Click "Configure "?" Add"
Executable File: D:/000/isapi_redirector2.dll
Extension:. jsp
OK
4) enter the Web service extension, click Add a row of Web Service extension, and write the extension to Jakarta. Select D:/000/isapi_redirector2.dll as the required file, and click OK.
5) Modify server. xmlwenj in D:/tomcat 5.0/CONF.
After line 2 (that is, <Context Path = "/dfg" docbase = "H: // dfg" DEBUG = "0"> </context>
6) Restart Tomcat and IIS after you restart IIS. Note that to restart IIS, you must restart the World Wide Web Publishing Service. You cannot restart only one website in IIS.
Test 3
1) Open the ISAPI filter of the dfg attribute in IIS Manager. The green arrow indicates that the filter is configured, and the red color indicates that the filter is not configured.
2) browser InputHttp: // 10.0.0.4: 8080/manager/html(10.0.0.4 is the Host IP address.) Check whether/dfg exists.
Go to dfg to see if the JSP page can be accessed
This exampleHttp: // 10.0.0.4: 8080/dfg/ASDF. jspAccessible. Remove port 8080, that is
Http: // 10.0.0.4/dfg/ASDF. JSP can still be accessed, indicating that the configuration is successful. (dfg and server. in XML, the context Path = "/dfg" corresponds to a domain name that must be added to the browser.