Integration of IIS6 and TOMCAT5

Source: Internet
Author: User
Tags define iis reference socket win32 tomcat
When IIS is building a WAP platform, because the WAP platform is compiled with MySQL, Tomcat, and Apache in Linux, the server environment I can provide can only be Win2003 server, IIS6, So looking for a iis6 with TOMCAT5 integration of the article, hoping to help others, but also for their own future review.

This article quoted from: Http://www.5ud.com/info/334.htm

It took a long time to finally fix the IIS6 and Tomcat integration. 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, Windows 2003 Server Chinese version +iis6+tomcat5.0.14,jdk 1.4.2 installation directory for C:\JDK,TOMCAT installation directory for C:\TOMCAT, environment variables Java_home and Tomcat The _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 do not say, the Web documents a lot, assuming that we have installed the TOMCAT5 and IIS6 and can run independently, both of the default Web site are pointing to the C:\web directory.

Now all we have to do is go to http://apache.linuxforum.net/dist/jakarta/tomcat-connectors/jk2/binaries/win32/. Jakarta-tomcat-connectors-jk2.0.2-win32-iis.zip to download JK2, the JK2 is responsible for IIS and Tomcat communication, after the unlock to get isapi_redirector2.dll, I put it in the C:\ Tomcat\iis (directory casually).
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!


[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


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, save the following paragraph and 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" = "C:\\tomcat"
"Extensionuri" = "/jakarta/isapi_redirector2.dll"
"Workersfile" = "c:\\tomcat\\conf\\workers2.properties"
"LogLevel" = "INFO"


Then open the "My Computer-> Control Panel-> Management tools->internet Information Service Manager", in the "Web site" in the Default Web site (the default site I assume to point to C:\web), on its right click on the "Properties" in the pop-up page box, select " ISAPI filters, click Add, filter names are filled in Jakarta, and the executable file fills in 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 chosen for your isapi_redirector2.dll storage directory, my is C:\tomcat\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 TOMCAT5, then net start w3svc start IIS6. Type http://localhost:8080/hello.jsp (This is the file I put under C:\web) look! Then look at the http://localhost/hello.jsp, if the two perform the same, congratulations, the integration is successful!

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 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 also tantamount to reprint, I was only responsible for input, if there are errors please point out! Welcome you to communicate with me, ymer@21cn.com,jsp programmer, EJB Learning ...

Reference URL: https://www.rit.edu/~ack5504/tomcat-iis6-howto/tomcat-iis6-howto.html
Http://www.knowsky.com/3181.html





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.