Iis6+tomcat integration, actual combat case!_jsp programming

Source: Internet
Author: User
Got the IIS6 and Tomcat integrated. Now put the steps out to give you a little reference, but also eliminates the novice in Google on the run and Time debugging. Let's go!
First describe my system, the Windows 2003 server Chinese version +iis6+tomcat5.5.17,jdk 1.5 installation directory for the D:\JDK1.5,TOMCAT installation directory for D:\Tomcat5.5,
Environment variables Java_home and Tomcat_home are set and point to their respective installation directories. (Note that all files involved in the Tomcat path are then modified to their own Tomcat path)
TOMCAT5 and IIS6 installation I will not say, the Web documents a lot, assuming that we have installed the TOMCAT5 and IIS6 and can operate independently,
Both of the default Web sites point to the C:\web directory.

What we're going to do now is to download Isapi_redirector2.dll, which is responsible for IIS and Tomcat communications, and I put it under the D:\tomcat5.5\iis (directory).
Next in the Tomcat installation directory under the Conf directory to build a workers2.properties file, the following section of the east to save. Pay attention to file= "..." The path to use "/" Oh!

#----------START--------------------------------------------
[SHM]
File=c:/tomcat/logs/jk2.log
size=1048576

# Replace all localhost and 8009 with your own IP and port when used in practice
[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

#
Request.tomcatauthentication=false
#---------End------------------------------------------------


Then edit the Jk2.properties file to confirm whether there is one sentence in it:

Request.tomcatauthentication=false

Next, start editing the registry, directly build a Iis.reg file, put a copy of the line below to save and then double-click Iis.reg to import the information into the registry. (Note, change the Tomcat path involved to your Tomcat's path)
--------------------------------------------------------------
Windows Registry Editor Version 5.00

[Hkey_local_machine\software\apache SOFTWARE Foundation\jakarta Isapi redirector\2.0]
"ServerRoot" = "d:\\tomcat5.5"
"Extensionuri" = "/jakarta/isapi_redirector2.dll"
"Workersfile" = "d:\\tomcat5.5\\conf\\workers2.properties"
"LogLevel" = "INFO"
--------------------------------------------------------------

Then open "My Computer-> Control Panel-> Management tools->internet Information Service Manager", in the "Web site" in the Default Web site (the default site I assume pointing to e:\cnyesoft.com), the right click on the "Properties", In the pop-up page box, select ISAPI Filter, click Add, Filter Name Jakarta, and fill in the executable file with the absolute path of your isapi_redirector2.dll. OK to close the property page when you are sure. Then on the "Default Web site" On the right, select "New"-> "virtual directory", alias fill Jakarta, Next, the path selected for your isapi_redirector2.dll storage directory, my is D:\tomcat5.5\iis, next, the right to remember to " Execute "That tick, OK, finish."
If you're using a IIS5, you can end up here, but IIS6 is not finished, go on.
Right-click on Web service Extensions in Internet Information Services Manager's Web site to select Add a new Web service extension. The pop-up box is populated with Tomcat (in fact it doesn't matter), "Requested file" select "Add" and then find your isapi_. "OK" after redirector2.dll. "Set extension status to allow" also tick, OK.
All right, we're done. Now we start the Tomcat5.5 and then start the IIS6. Type http://localhost:8080/hello.jsp (This is the file I put under e:\cnyesoft.com) look! Then look at the http://localhost/hello.jsp, if the two perform the same, congratulations, the integration is successful!
######################## #注意 #########################################################
Q: Tomcat installed in D disk, I would like to run e-disk in the JSP file, how to set?
For:
Example: My tomcat is mounted in D disk
D:\tomcat-5.5\conf\Catalina\localhost\ROOT.xml
Root is the project name (the default directory, which can be changed).
The root content is:
<context path= "/root" docbase= "E:\cnyesoft.com" reloadable= "true"/>
Docbase is the target address of your project, if you put it in E:\cnyesoft.com, you can change it directly.
Cases:
Root.xml content is:
<context path= "/root" docbase= "E:\cnyesoft.com" reloadable= "true"/>
#####################################################################################

But perhaps not at this time, then you should confirm the following points:
1. Is the Jakarta in your "Internet Information Services Manager"-> "Web site"-> "Default Web Site"-> "Properties"-> "ISAPI Filters" a green arrow up? If it's red, check to see if the configuration you've made is missing or incorrectly written, and then reconfigure it again.
2. Confirm your common\ under the Tomcat installation directory Lib directory whether there are Tools.jar files (Tomcat5.5 seems to have, but there is no Tomcat4, online documents rarely mentioned this matter, causing me to configure the failure many times), no words from the JDK under the Lib a past.
3.IIS points to a directory that is best aligned to the directory that Tomcat points to, or an issue where images and other resource files cannot be found. (This does not affect implementation, hehe!)
4. The English document also mentions that the IIS6 should be set to IIS5 isolation mode, "Internet Information Services Manager"-> "website"-> "Properties"-> "service" and tick "run WWW service in IIS5.0 isolation mode". However, I can not check the normal use, if you do not configure the success can also try this.

Not yet? OK, we come to ruthless, open the chassis, remove the hard drive, throw to the ground for me to tread, step, step! See you dare to ^_^ with me (a joke, but before I configured a number of failed to really have some frustration and chagrin)
This article is actually equivalent to reprint, I just actually operated once, if there are errors please point out! Welcome you to communicate with me, cnyesoft@126.com,jsp programmer, EJB Learning ...
Click to download TXT file
Click to download Isapi_redirector2.dll and files

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.