Iis7 integrated Tomcat 6

Source: Internet
Author: User

Encountered. net2.0ProgramThe JSP program is involved. iis7 has configured the domain name, while Tomcat port 8080 uses http: // localhost: 8080/MyApp

Inaccessible. So I found out how iis7 integrated Tomcat 6 on the Internet: refer

Slightly modified http://blog.csdn.net/liuyi1985/archive/2009/04/02/4045031.aspx

Assume that the host domain name is www.mydomain.com (or localhost)

Requirement 1: If $ {tomcat_home}/webapps has a web directory named myjspapp (or myjspapp. War), we would like to use http://www.mydomain.com/myjspapp myjspappproject

Step 1:
Download the isapi_redirect-version. dll file as the interface between IIS and tomcat, I downloaded the isapi_redirect-1.2.28.dll
: Http://apache.justdn.org/tomcat/tomcat-connectors/jk/binaries/win32/
Then put the file under $ {tomcat_home}/CONF.

Step 2:
Create the following registry file and execute

 Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE \ SOFTWARE \ Apache Software Foundation \ Jakarta ISAPI redirector \ 1.0] " LOG_FILE " = " E: \ tomcat6.0 \ logs  ""  log_level  "="  debug " " worker_file " = " E: \ tomcat6.0 \ conf \ workers. properties  ""  worker_mount_file  "="  E: \ tomcat6.0 \ conf \ uriworkermap. properties  ""  tomcat_start  "="  E: \ tomcat6.0 \ bin \ tomcat. bat start  ""  tomcat_stop  "="  E: \ tomcat6.0 \ bin \ tomcat. bat stop  ""  extension_uri  "=" /Jakarta/isapi_redirect-1.2.28.dll " 

Note: Modify the tomcat-related path (in my system, the tomcat installation directory is"E: \ tomcat6.0")

Step 3:
Create two files under Tomcat \ conf
File 1: workers. Properties

 
# The name of the workstation is arbitrary, but the names must be consistent. multiple workstations are separated by commas. list = ajp13w # workstation type: ajp13 is the name of the communication protocol worker between IIS and tomcat. ajp13w. type = ajp13# Note that the host must be the same as the host or domain name.Worker. ajp13w. Host = www.mydomain.cn
 
# Worker. ajp13w. Host = localhost # communication port worker. ajp13w. Port = 8009 # server load factor worker. worker1.lbfactor = 1
 
 
 
File 2: uriworkermap. Properties
 
# The request whose context path is your JSP project name myjspapp under the current domain name is forwarded to the ajp13w workstation for processing/myjspapp/* = Ajp13w/myjspapp = ajp13w# All requests under the current domain name are forwarded to the ajp13w workstation for processing #/* = ajp13w # All requests under the current domain name. JSP requests are forwarded to the ajp13w workstation for processing #/*. JSP # In the frontend domain name, all requests except for .html are forwarded to the ajp13w workstation for processing #! /*. Html

Step 4:
In IIS manager, right-click ISAPI and CGI limits to add a isapi_redirect-1.2.28.dll and set allow extension paths to be executed. Description name can be obtained from Jakarta

Step 5:

Add an application to the "Default web site" (or the defaultwebsite created by yourself) on the website. The application name should be in the registry.Extension_uri"Jakarta", and then point the physical path to the directory where isapi_redirect.dll is located.

If the permission for the test configuration fails, you can specify a system administrator as a dedicated user.

Step 6:

Click this application (this site) to goHandler ingClick"Edit the handler permission...", Mark" execution ..

Step 7:

Next, click default web site, select ISAPI filter, right-click Add filter, name takes Jakarta, executable file select isapi_redirect-1.2.28.dll.

Step 8: (The above uriworkermap. properties configuration depends on your choice)

In "Default web site" -- "double-click" handler ing "-- upper right corner --" add a ing script. *. jsp is mapped to isapi_redirect.dll for processing.

Step 9:
Restart the IIS server and tomcat. Http://www.mydomain.com/myjspapp access

Note: In this configuration method, you do not need to configure the domain name for tomcat in the traditional method, that is, you do not need to change the original server. xml. You can configure it in the workers. properties mentioned above.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.