Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to configure TOMCAT+IIS

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

Editor to share with you how to configure TOMCAT+IIS, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

one。 Description:

The configuration is as follows: Win2000 Server + IIS 5.0( included with Win2000) + Tomcat 3.1binary release.

The Tomcat 3.1 I use is a compiled version in which IIS and NT Service are not configured

, but there are more detailed help files in Tocmcat 3.2 source version. According to these help files, Tomcat can be successfully inserted into IIS as a plug-in.

two。 Start tomcat

After installing tomcat (the specific installation process is brief), it is easy to start Tomcat. First, you can view the tomcatinstartup.bat file, use the system-> Advanced-> Environment variables dialog box in the Control Panel, and create new environment variables TOMCAT_HOME and JAVA_HOME, so that they point to the root directories of TOMCAT and JDK respectively. In addition, to be on the safe side, you can add the paths of both in path. Then open a DOS window to execute startup.bat. After you start Tomcat, a DOS window displays the startup status. Visit http://localhost:8080 at this time to see some examples of Tomcat.

three。 Configuration

The next step is how to insert Tomcat into IIS so that the two work together. The main steps are as follows:

1. Register in the Windows registry:

Load the following Jakarta.reg file between begin and end into the machine. My Tomcat is installed in c:jakarta-tomcat. You can modify the Jakarta.reg file according to your environment.

Jakarta.reg:

-begin

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINESOFTWAREApache Software FoundationJakarta Isapi Redirector1.0]

"extension_uri" = "/ jakarta/isapi_redirect.dll"

"log_file" = "c:jakarta-tomcatlogsisapi.log"

"log_level" = "debug"

"worker_file" = "c:jakarta-tomcatconfworkers.properties"

"worker_mount_file" = "c:jakarta-tomcatconfuriworkermap.properties"

-end

Note: the path should be changed to the installation path of your tomcat.

2. Open the IIS manager, create a virtual directory jakarta in the default WEB site, and let its path point to the directory where isapi_redirect.dll is located. (you may not have this dll in 3. 1 bin, you can copy one from the biniis t4i386 directory of 3. 2. The virtual directory should be set to executable.

3. Use the IIS manager to set isapi_redirect.dll as the "default WEB site" ISAPI filter, with any name you want.

4. Restart IIS, make sure that the ISAPI filter you just added is preceded by a green up arrow, and then restart Tomcat (execute tomcatinshutdown.bat to close Tomcat). At this point, IIS should be able to process * .jsp files. Since the default Root in the Tomcat setting is tomcatwebappsROOT, 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 still can't get IIS to process jsp files as described above, try adding an "application mapping" in the IIS Manager-> default WEB site Properties-> Home Directory-> configuration to map the * .jsp file to isapi_redirect.dll.

four。 As a service of NT

It is relatively simple to set up as NT service.

First copy the jk_nt_service.exe from 3.2, then save the following and name it.

For wrapper.properties

#

# $Header: / home/cvs/jakarta-tomcat/src/etc/wrapper.properties,v 1.1

# 11:54:49 on 2000-05-03 shachor Exp $

# $Revision: 1.1$

# $Date: 11:54:49 on 2000-05-03 $

#

#

# 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. Do not use them!!!

#

# Whenever you see a set of lines such as:

# x=value

# yearly $(x) something

#

# the final value for y will be valuesomething

#

# Normaly all you will need to modify is the first 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: omcat

#

# wrapper.java_home should point to your Java installation. Normally

# you should have a bin and lib directories beneath it.

#

Wrapper.java_home=d:JBuilder35jdk1.2.2

#

#-ADVANCED MODE--

# Make sure that you read the how-to before making too many changes.

#-

#

#

# 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 you store DLLs for

# native methods etc.

#

Wrapper.ld_path=d:

Wrapper.ld_path=c:

#

# Defining the classpath. All the rows that belongs to the class_path

# property are concatenated to create the classpath for Tomcat.

#

# If you have additional locations that you would like to add to the

# claspath you should add a new wrapper.class_path=

Line.

#

Wrapper.class_path=$ (wrapper.tomcat_home) classes

Wrapper.class_path=$ (wrapper.tomcat_home) libxml.jar

Wrapper.class_path=$ (wrapper.tomcat_home) libwebserver.jar

Wrapper.class_path=$ (wrapper.tomcat_home) libservlet.jar

Wrapper.class_path=$ (wrapper.tomcat_home) libjasper.jar

#

# This is where Javac is located in JDK1.2.x

#

Wrapper.class_path=$ (wrapper.java_home) lib ools.jar

#

# and a tribute to JDK1.1.x

#

Wrapper.class_path=$ (wrapper.java_home) libclasses.zip

#

# This is the Java interpreter used for running Tomcat

#

Wrapper.javabin=$ (wrapper.java_home) injava.exe

#

# This is Tomcats startup class (the class that contains Tomcats

# starting point.

#

Wrapper.startup_class=org.apache.tomcat.startup.Tomcat

#

# This is the location where tomcats server.xml configuration file

# is located.

#

Wrapper.server_xml=$ (wrapper.tomcat_home) confserver.xml

#

# The NT service uses AJP12 to shutdown Tomcat. The wrapper.shutdown_port

# tells the service the identity of the port that is used by AJP12.

#

Wrapper.shutdown_port=8007

#

# This is the command line that is used to start Tomcat. You can * add* extra

# parameters to it but you 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)

After saving, just modify the wrapper.tomcat_home and wrapper.java_home so that they point to the tomcat root directory and the JDK root directory, respectively. Then run the jk_nt_service-I service name as you like, such as tomcat or jakarta, etc. The path of wrapper.properties should be the full path (including the file name of wrapper.properties) example: jk_nt_service-I Jakarta d:wrapper.properties so in the Control Panel-> service, we can see a service called Jakarta, where you can start or stop it. The above is all the content of this article "how to configure TOMCAT+IIS". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report