tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Dravet" <dra...@calumet.purdue.edu>
Subject RE: ISAPI_REDIRECT.DLL & Windows Server 2003
Date Thu, 06 Nov 2003 16:00:18 GMT
Try this.

Tomcat 4.1.29, II6 and Windows 2003 Mini-HowTo
By Jason Dravet, dravet@calumet.purdue.edu
Version 1.0 November 4 2003

This document describes how to install and configure tomcat and IIS to wrok
together on windows 2003 server.
______________________________________________________________________

Table of Contents

1.  Introduction

2.  Installation of tomcat

3.  Configuration of IIS

______________________________________________________________________

1.  Introduction

These are the steps I took to get these three products to work together.  I
have seen several sets of instructions on how get these three products to
work together, but they all seemed to be lacking some bits of information.
So I decided to write this howto and bring all of the parts together in one
document.  I would like to thank Adam Krouskop for the help he gave me in
figuring out my context problem.

2.  Installation of Tomcat

1.	Download JSDK 1.4.2_02.  This version fixes a problem with tomcat
letting people see the source code by changing the case of the jsp file.
Install it to directory that does NOT have spaces in it.
2.	Download the JK 1.2 connector from
http://jakarta.apache.org/site/binindex.cgi.   The latest version as of this
writing is 1.2.5.  The filename is isapi_redirect_1.2.5.dll  Once downloaded
rename the file to isapi_redirect.dll
3.	Download tomcat.  The latest version at this time is 4.1.29.  I
recommend downloading the jakarta-tomcat-4.1.29-LE-jdk14.exe file.  This
file will install tomcat as a service for you and it is smaller to download
than the zip version.
4.	Run the tomcat installer.  Install to a directory without spaces or
periods.  If you installed the JSDK before tomcat then tomcat should pick up
on where the JSDK is located.  If you have multiple JSDK versions installed
the tomcat installer will let you pick which one you want to use.
5.	Copy the isapi_redirect.dll file into the bin folder under the
tomcat installation location.
6.	You need to install some registry keys.  Copy the following lines to
a tomcat.reg file.  Change the log_file, worker_file, and worker_mount_file
keys to reflect your tomcat installation location.  Then double-click on the
tomcat.reg file and say yes.
______________________________________________________________________
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation]

[HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi
Redirector]

[HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi
Redirector\1.0]
"extension_uri"="/jakarta/isapi_redirect.dll"
"log_file"="d:\\tomcat41\\logs\\iis_redirect.log"
"log_level"="error"
"worker_file"="d:\\tomcat41\\conf\\workers.properties"
"worker_mount_file"="d:\\tomcat41\\conf\\uriworkermap.properties"
______________________________________________________________________

7.	Reboot so the registry changes can take effect.

3.  Configuration of IIS

1.	Start IIS Manger.  Right click on the website that you want to use
tomcat, click on new and then click on virtual directory.  Type in Jakarta
for the alias.  Click Next.  Click on the browse button.  Browse to the bin
directory under your tomcat installation location.  Click OK.  Click Next.
Put a check in the checkbox next to Execute (such as ISAPI applications or
CGI).  Click on Next then click finish.
2.	Right click on the website you want to use tomcat and go to
properties.  Click on the ISAPI Filters tab.  Click on Add.  Type in Jakarta
for the filter name and browse to the isapi_redirect.dll.  Click OK.
3.	Click on the Home directory tab.  Click on the configuration button.
Click on add.  For the executable setting again browse to the
isapi_redirect.dll location.  For the extension type in jsp and click OK.
Click on OK to close the application configuration window.  Click on OK to
close the website properties.
4.	Right click on Web Service Extensions.  Click on Add a new Web
server extension.  Type in Jakarta (or whatever you want) for the extension
name.  Click on the add button.  Browse to the isapi_redirect.dll location.
Click on OK to close the add file window.  On the New Web Service Extension
window you should see the isapi_redirect.dll location.  Put a check in the
checkbox next to Set extension status to Allowed.  Click on OK to close the
window
5.	Set the permissions on the tomcat installation location so that
everyone has read rights.
6.	Copy the following into a uriworkermap.properties file and put it in
the conf folder under your tomcat installation location.
______________________________________________________________________
#
# Default worker to be used through our mappings
#
default.worker=ajp13

#
# Sites to be redirected to Tomcat
#
/*.jsp=ajp13
# /examples=$(default.worker)
# /examples/*=$(default.worker)
______________________________________________________________________

The /*jsp=ajp13 tells tomcat to serve only pages that end in jsp.  I
commented out the last two lines because I don't want to let people access
the examples on a production server.  Call me paranoid but I just don't
think that is a good idea for a production server.

7.	Copy the following to a workers.properties file and put it in the
conf folder under your tomcat installation location.
______________________________________________________________________

# workers.properties -
#
# This file provides jk derived plugins with the needed information to
# connect to the different tomcat workers.  Note that the distributed
# version of this file requires modification before it is usable by a
# plugin.
#
# As a general note, the characters $( and ) are used internally to 
# define
# macros. Do not use them in your own configuration!!!
#
# Whenever you see a set of lines such as:
# x=value
# y=$(x)\something
#
# the final value for y will be value\something
#
# Normaly all you will need to do is un-comment and modify the first 
# three
# properties, i.e. workers.tomcat_home, workers.java_home and ps.
# Most of the configuration is derived from these.
#
# When you are done updating workers.tomcat_home, workers.java_home and 
# ps
# you should have 3 workers configured:
#
# - An ajp12 worker that connects to localhost:8007
# - An ajp13 worker that connects to localhost:8009
# - A jni inprocess worker.
# - A load balancer worker
#
# However by default the plugins will only use the ajp12 worker. To 
# have
# the plugins use other workers you should modify the worker.list 
# property.
#
#

# OPTIONS ( very important for jni mode ) 

#
# workers.tomcat_home should point to the location where you
# installed tomcat. This is where you have your conf, webapps and lib
# directories.
#
workers.tomcat_home=d:\tomcat41

#
# workers.java_home should point to your Java installation. Normally
# you should have a bin and lib directories beneath it.
#
workers.java_home=c:\j2sdk1.4.2_02

#
# You should configure your environment slash... ps=\ on NT and / on 
# UNIX
# and maybe something different elsewhere.
#
ps=\
# ps=/

#
#------ ADVANCED MODE ------------------------------------------------
#---------------------------------------------------------------------
#

#
#------ DEFAULT worket list ------------------------------------------
#---------------------------------------------------------------------
#
#
# The workers that your plugins should create and work with
#
# Add 'inprocess' if you want JNI connector 
worker.list=ajp13
# , inprocess


#
#------ DEFAULT ajp12 WORKER DEFINITION ------------------------------
#---------------------------------------------------------------------
#

#
# Defining a worker named ajp12 and of type ajp12
# Note that the name and the type do not have to match.
#
worker.ajp12.port=8007
worker.ajp12.host=localhost
worker.ajp12.type=ajp12
#
# Specifies the load balance factor when used with
# a load balancing worker.
# Note:
#  ----> lbfactor must be > 0
#  ----> Low lbfactor means less work done by the worker.
worker.ajp12.lbfactor=1

#
#------ DEFAULT ajp13 WORKER DEFINITION ------------------------------
#---------------------------------------------------------------------
#

#
# Defining a worker named ajp13 and of type ajp13
# Note that the name and the type do not have to match.
#
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
#
# Specifies the load balance factor when used with
# a load balancing worker.
# Note:
#  ----> lbfactor must be > 0
#  ----> Low lbfactor means less work done by the worker.
worker.ajp13.lbfactor=1

#
# Specify the size of the open connection cache.
#worker.ajp13.cachesize

#
#------ DEFAULT LOAD BALANCER WORKER DEFINITION ----------------------
#---------------------------------------------------------------------
#

#
# The loadbalancer (type lb) workers perform wighted round-robin
# load balancing with sticky sessions.
# Note:
#  ----> If a worker dies, the load balancer will check its state
#        once in a while. Until then all work is redirected to peer
#        workers.
worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=ajp13


#
#------ DEFAULT JNI WORKER DEFINITION---------------------------------
#---------------------------------------------------------------------
#

#
# Defining a worker named inprocess and of type jni
# Note that the name and the type do not have to match.
#
worker.inprocess.type=jni

#
#------ CLASSPATH DEFINITION -----------------------------------------
#---------------------------------------------------------------------
#

#
# Additional class path components.
#
worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)tomcat.jar

#
# Setting the command line for tomcat. 
# Note: The cmd_line string may not contain spaces.
#
worker.inprocess.cmd_line=start

# Not needed, but can be customized.
#worker.inprocess.cmd_line=-config
#worker.inprocess.cmd_line=$(workers.tomcat_home)$(ps)conf$(ps)server.xml
#worker.inprocess.cmd_line=-home
#worker.inprocess.cmd_line=$(workers.tomcat_home)

#
# The JVM that we are about to use
#
# This is for Java2
#
# Windows
worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)bin$(ps)classic$(p
s)jvm.dll
# IBM JDK1.3 
#worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)bin$(ps)classic$(
ps)libjvm.so
# Unix - Sun VM or blackdown
#worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)lib$(ps)i386$(ps)
classic$(ps)libjvm.so

#
# And this is for jdk1.1.X
#
#worker.inprocess.jvm_lib=$(workers.java_home)$(ps)bin$(ps)javai.dll

#
# Setting the place for the stdout and stderr of tomcat
#
worker.inprocess.stdout=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stdout
worker.inprocess.stderr=$(workers.tomcat_home)$(ps)logs$(ps)inprocess.stderr

#
# Setting the tomcat.home Java property
#
#worker.inprocess.sysprops=tomcat.home=$(workers.tomcat_home)

#
# Java system properties
#
# worker.inprocess.sysprops=java.compiler=NONE
# worker.inprocess.sysprops=myprop=mypropvalue

#
# Additional path components.
#
# worker.inprocess.ld_path=d:$(ps)SQLLIB$(ps)bin
#
______________________________________________________________________

8.	Edit the server.xml file in the conf directory.  Find the line 

<Context path="" docBase="ROOT" debug="0"/>

Replace ROOT with the full path to your wwwroot folder, d:\wwwroot for
example.  Delete the <!-- and the --> above and below the context path line.

That should be it.  You should be able to start the apache tomcat service.
Then you have to restart the world wide web publishing service. Copy the
following to a hello.jsp and put in your wwwroot folder.  To view go to
http://servername/hello.jsp  You should see Hello, World, from JSP on the
screen.  Don't forget to set the apache service to automatic in service
manager so the next time you reboot the apache tomcat service will start.

<HTML>
<HEAD>
<TITLE>hello jsp</TITLE>
<% String message = "Hello, World, from JSP"; %>
</HEAD>
<BODY>
<h2><font color="#AA0000"><%= message %></font></h2>
</BODY>
</HTML> 

-----Original Message-----
From: Hart, Justin [mailto:JHart@sfa.com] 
Sent: Thursday, November 06, 2003 8:28 AM
To: Tomcat Users List
Subject: RE: ISAPI_REDIRECT.DLL & Windows Server 2003

That seems to be a common problem, people have had mixed results getting
that combo to work.

I'm going to take a wild guess and say it's IIS 6.0?

Justin

-----Original Message-----
From: Chris Freeborn [mailto:ChrisF@teamadapt.com]
Sent: Wednesday, November 05, 2003 3:46 PM
To: 'tomcat-user@jakarta.apache.org'
Subject: ISAPI_REDIRECT.DLL & Windows Server 2003


Is there a new version of ISAPI_REDIRECT.DLL for use with Windows Server
2003?

I have set up Tomcat to work with IIS on several different servers in the
past (mostly Win2K machines), but I am having a great deal of trouble
getting it to work on Windows Server 2003. Keep getting page not found
errors.

Screenshots of the problem can be found at
http://www.teamadapt.com/bcu/tomcatscreenshots.doc. I'd appreciate any help
you could offer.

Chris Freeborn
Adapt, LLC
773-634-2046



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message