Tomcat + IIS configuration method

xiaoxiao2021-03-06  39

I. Description: Configure the following: Win2000 Server IIS 5.0 (win2000 comes with) Tomcat 3.1 Binary Release. I use Tomcat 3.1 is a compiled version, and there is no instructions for IIS and NT Service in this version, but in TOCMCAT 3.2 Source version has a more detailed help file. According to these help files, you can insert Tomcat as a plugin into IIS. II. After starting Tomcat installation Tomcat (Slightly installed) Environment variables Tomcat_Home and Java_Home enable them to point to the root directory of Tomcat and JDK. In addition, it is the beginning of the insurance, you can add the path to the path in Path. Then turn on a DOS window to perform Startup.bat. After starting Tomcat, there will be a DOS window display boot condition. At this point, you can see some examples of Tomcat in this point. III. Configuration The next step is how to insert Tomcat into IIS so that the two work together. The following steps: environmental modification Jakarta.reg file 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, create a virtual directory Jakarta in the Default Web Site, let it point to the directory where ISAPI_Redirect.dll is located. (There may be no DLL in 3.1 bin, you can copy one from the 3.2 Bin / IIS / NT4 / i386 directory. This virtual directory should be set to "Execute". 3, using the IIS Manager, put the isapi_redirect. The DLL is set to "Default Web Site" ISAPI filter, the name can be destined. 4, restart IIS, confirm that the ISAPI filter just added in front of a green upward arrow and restart Tomcat (execute tomcat / bin / shutdown.bat) You can close Tomcat that IIS should have handled * .jsp files.

Due to TOMCAT settings, the default root is Tomcat / WebApps / root, so you can place a JSP file (such as index.jsp) in this directory, then access http: //localhost/index.jsp, look at the effect. If you still can't make the IIS manager -> Default Web Site Properties -> Properties -> Configuration to add an "application map" in the IIS Manager -> Default Web Site Properties -> Properties -> Configuration, map the * .jsp file to isapi_redirect. DLL. 4. Services as NT as NT Service is relatively simple.

First copy JK_NT_SERVICE.EXE from 3.2, then save the following content, named 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. Do not use them !!! # # Whenever you see A set of lines such as: # x = value # y = $ () / something # # The final value for y Will be value / something # Normaly All You Will Need To Modify Is The First Two Properties, IE # walapper .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.j AVA_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 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.rr.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) /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 is 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

# 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 That Is Used by Ajp12.

#

Wrapper.shutdown_port = 8007

#

# This is the command line That is buy to start tomcat. You can * add * extra

# Parameters to it but can not remove anything.

#

Wrapper.cmd_line = $ (wrapper.javabin) -classpath $ (wrapper.class_path) $ (wrapper.Startup_class) -config $ (wrapper.server_xml) -home $ (wrapper.tomcat_home)

After saving, simply modify the wrapper.tomcat_home and wrapper.java_home inside make them respectively point to the Tomcat root directory and JDK root directory. Then run the JK_NT_SERVICE -I

The service name can be casual, such as Tomcat or Jakarta, etc. The path of Wrapper.properties should be a full path (including the file name of Wrapper.properties) example: jk_nt_service -i jakarta d: /wrapper.properties This in the control panel -> service, we can see a service called Jakarta, Can start or stop it here

Source:

http://www.3yee.com/articles/186.aspx

转载请注明原文地址:https://www.9cbs.com/read-58542.html

New Post(0)