tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ricardo Gladwell" <ricardo.gladw...@ubqtmedia.com>
Subject Workaround for ISAPI Index Loading Problem
Date Wed, 04 Apr 2001 13:24:58 GMT
Dear All,

About a couple of days ago I posted a query regarding Gal Shachor's ISAPI
filter for Tomcat. After fruitless searching I discovered a solution (read
hack) to the problem quite by accident.

The problem is thus: configuring IIS server to forward any requests from its
root for servlets or JSP files to Tomcat is simple. Just add a context in
server.xml whose docBase points to the web root of IIS and add the following
line to uriworker.properties:

/*.jsp=ajp12

IIS will continue to serve other pages (.html or .asp for example) itself
but will use Tomcat to handle JSP (and servlets if you wish). The problems
begins when you want IIS to use JSP "default documents" (index pages to you
and I) such as index.jsp. The ISAPI filter doesn't know to check IIS for an
index page when it encounters a directory URI unless it is explicitly
instructed to. If you specify an index.jsp page in the 'Default Document'
dialog in the IIS set-up utility you just get the raw, un-compiled JSP page
passed to the client.

It is simpler to remove any reference to index.jsp from IIS and try one of
two solutions to the problem:

a) Add an index.html of Default.htm document in same directory as your
index.jsp page that contains a redirection command. This is ugly because the
client will see a flicker as the pages switch.

b) My solution is, for each directory that has an index.jsp page add a
reference to in the uriworker.properties file. For example, if you have an
index.jsp page in the /intranet/ directory of your site you need to add:

/intranet/=ajp12

to uriworker.properties. This is better than a) because the client doesn't
ever see the misdirection, although every time you add an index.jsp to your
site you have to alter the uriworker.properties file and restart IIS!

Let me know if this was of use to anyone or if anyone has a better
workaround. Yours...

--
Ricardo Gladwell
UBQT Media PLC
Mobile: (07779) 841 444


Mime
View raw message