Tomcat+iis Configuration Method _ Server

Source: Internet
Author: User
Tags wrapper tomcat

I. Description:
Configured as follows: Win2000 Server + IIS 5.0 (Win2000) + Tomcat 3.1 binary release.
The Tomcat 3.1 I use is a compiled version with no IIS and NT Service configured in this release
, but there are more detailed help files in the Tocmcat 3.2 source version. Depending on these help files, you can successfully insert Tomcat as a plug-in into IIS.



Two. Start Tomcat
After you install Tomcat (a specific installation process), to start Tomcat is simple, you can first view the Tomcat\bin\startup.bat file, using the control panel inside the system-> Advanced-> Environment Variable dialog box, new environment variable Tomcat_ Home and Java_home, so they point to the root directory of Tomcat and JDK. In addition, for insurance purposes, you can add the paths of both to the path.  Then open a DOS window to perform the Startup.bat. When Tomcat is started, a DOS window displays the boot status. Some examples of Tomcat can be seen at this point in the access http://localhost:8080.



Three. Configure
The next step is to insert Tomcat into IIS to work together. The following steps are mainly divided:
1. Register in the Windows registry:
Put the Jakarta.reg file between the begin and end of the following into the machine, my Tomcat is installed in C:\\jakarta-tomcat, you can modify Jakarta.reg file according to your environment
Jakarta.reg:
---begin---
Windows Registry Editor Version 5.00



[Hkey_local_machine\software\apache SOFTWARE Foundation\jakarta Isapi redirector\1.0]
"Extension_uri" = "/jakarta/isapi_redirect.dll"
"Log_file" = "C:\\jakarta-tomcat\\logs\\isapi.log"
"Log_level" = "Debug"
"Worker_file" = "c:\\jakarta-tomcat\\conf\\workers.properties"
"Worker_mount_file" = "c:\\jakarta-tomcat\\conf\\uriworkermap.properties"
---end---
Note: The path needs to be changed to your Tomcat installation path.



2, open IIS Manager, in the "Default Web site" to create a virtual directory Jakarta, so that its path to point to the Isapi_redirect.dll directory. (You may not have this DLL in the 3.1 bin, you can copy one from the 3.2 bin\iis\nt4\i386 directory.) The virtual directory should be set to executable.
3. Using IIS Manager, set the Isapi_redirect.dll as the ISAPI filter for the default Web site, and the name can be allowed.
4. Restart IIS to confirm that the ISAPI filter you just added is preceded by a green up arrow and then restarted Tomcat (perform tomcat\bin\shutdown.bat to turn off Tomcat) at this point, IIS should already be able to process the *.jsp file.  Because the default root is tomcat\webapps\root in Tomcat settings, you can place a JSP file (such as index.jsp) in this directory, and then visit http://localhost/index.jsp to see the effect. If you cannot make IIS work with JSP files by using the above method, you can try to add an "application mapping" in the IIS Manager-> Default Web site Properties-> home directory-> configuration to map *.jsp files to Isapi_redirect.dll.



Four. As NT Services
The settings for NT service are simpler.
First from 3.2 copy come over Jk_nt_service.exe, and then save the following content, name
For Wrapper.properties
#
# $Header:/home/cvs/jakarta-tomcat/src/etc/wrapper.properties,v 1.1
#2000/05/03 11:54:49 shachor EXP $
# $Revision: 1.1 $
# $Date: 2000/05/03 11:54:49 $
#
#
# jk_service.properties-a Bootstrup file for the Tomcat NT service.
#
# This file provides Jk_nt_service with the needed information to
# start Tomcat at a different process.
#
# As a general note, the characters $ (and) are used internally to define
# Macros. Don't use them!!!
#
# Whenever you'll have a set of lines such as:
# X=value
# y=$ (x) \something
#
# The final value for y would be value\something
#
# normaly all your'll need to modify is the the the-two properties, i.e.
# Wrapper.tomcat_home and Wrapper.java_home. Most of the configuration
# is derived from these two.
#
#
# Wrapper.tomcat_home should point to the location where you
# installed Tomcat. This is where you have your conf, WebApps and Lib
# directories.
#
Wrapper.tomcat_home=d:\tomcat
#
# Wrapper.java_home should point to your Java installation. Normally
# You should have a bin and lib directories beneath it.
#
wrapper.java_home=d:\jbuilder35\jdk1.2.2
#
#------ADVANCED MODE------------------------------------------------
# Make sure ' you read the how-to before making too many.
#---------------------------------------------------------------------
#
#
# Defining where the service is going to put the standard
# Output of Tomcat. This is where System.out.println and
# System.err.println goes to.
#
wrapper.stdout=$ (wrapper.tomcat_home) \jvm.stdout
wrapper.stderr=$ (wrapper.tomcat_home) \jvm.stderr
#
# Additions to the path. Put here directories where your store DLLs for
# Native methods etc.
#
Wrapper.ld_path=d:\
Wrapper.ld_path=c:\
#
# Defining the Classpath. All of the rows that belongs to the Class_path
# property are concatenated to create the classpath for Tomcat.
#
# If you have additional locations so you would like to add to the
# Claspath You should add a new wrapper.class_path=<location> line.
#
wrapper.class_path=$ (wrapper.tomcat_home) \classes
wrapper.class_path=$ (wrapper.tomcat_home) \lib\xml.jar
wrapper.class_path=$ (wrapper.tomcat_home) \lib\webserver.jar
wrapper.class_path=$ (wrapper.tomcat_home) \lib\servlet.jar
wrapper.class_path=$ (wrapper.tomcat_home) \lib\jasper.jar
#
# This is where Javac was located in jdk1.2.x
#
wrapper.class_path=$ (wrapper.java_home) \lib\tools.jar
#
# and a Tribute to jdk1.1.x
#
wrapper.class_path=$ (wrapper.java_home) \lib\classes.zip
#
# This is the Java interpreter used for running Tomcat
#
wrapper.javabin=$ (wrapper.java_home) \bin\java.exe
#
# This is Tomcat ' s startup Class (the class that contains Tomcat "s
# starting point.
#
Wrapper.startup_class=org.apache.tomcat.startup.tomcat
#
# This is the location where Tomcat ' s server.xml configuration file
# is located.
#
wrapper.server_xml=$ (wrapper.tomcat_home) \conf\server.xml
#
# The NT service uses AJP12 to shutdown Tomcat. The Wrapper.shutdown_port
# tells the service the identity of the ' port ' is used by AJP12.
#
wrapper.shutdown_port=8007
#
# This is the ' command line ' is used to start Tomcat. You can *add* extra
# parameters to it but your can not remove anything.
#
wrapper.cmd_line=$ (Wrapper.javabin)-classpath $ (wrapper.class_path) $ (wrapp
Er.startup_class)-config $ (wrapper.server_xml)-home $ (wrapper.tomcat_home)
Once saved, simply modify the inside wrapper.tomcat_home and wrapper.java_home so that they point to the Tomcat root directory and the JDK root directory. Then run the Jk_nt_service-i < service name > <wrapper.properties path > Service name can be random, such as Tomcat or Jakarta, and so on. The path to wrapper.properties should be the full path (including the wrapper.properties file name) Example: Jk_nt_service-i Jakarta d:\wrapper.properties So in Control Panel- > Services, we can see a service called Jakarta, where it can be started or aborted.

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.