tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <>
Subject Re: Servlet invoker woes - servlet-mapping /servlets/* to invoker fails on 3.2
Date Mon, 20 Nov 2000 19:16:47 GMT
Rachel Greenham wrote:

> On Saturday 18 November 2000 00:29, you wrote:
> > As of Tomcat 3.2-b8 (to be created on Monday), you will be able to set a
> > parameter in the server.xml file to override the prefix used by the invoker
> > servlet.  There is an entry that looks like this:
> >
> >     <RequestInterceptor
> >         className="org.apache.tomcat.request.InvokerInterceptor"
> >         debug="0" prefix="/servlet/" />
> >
> > and you can change the prefix attribute to "/servlets/" for your particular
> > case.
> I already did this, on 3.2b7, the same solution works already. That's how I
> resolved the issue for now, but I wasn't happy with it, because our webapps
> weren't compatible between 3.1 and 3.2, which was worrying to say the least.
> What's needed is a *standard* solution to this problem that will work across
> all API-compliant servlet containers - ie: defined in the WEB-INF/web.xml for
> the webapp. Or I need to know for sure that there is no such standard
> solution and we should be using aliases for all our servlets. I had another
> look through the API specification and to me it looks like the latter, which
> would be a major pain.

As I have written several times before, there is *no* standard for the invoker
service (/servlet/* or /servlets/*).  It is *not* part of the servlet
specification -- if you'd like to encourage it to be added, you should send mail
to the address on the spec (

What *is* in the standard is the servlet mappings that are defined in the 2.2
specification, which you can download at
<>.  This is the only thing you
can count on being portable.

> > In Tomcat 4.0, the ability to configure global defaults in the
> > "conf/web.xml" file is restored to the way it worked in Tomcat 3.1 -- it is
> > much more intuitive for things like this.
> Because we're trying to write nice well-behaved webapps, we don't want to
> have to change a global setting, only a local-to-webapp setting. I was able
> to do this on Tomcat 3.1.

Tomcat 3.2 was changed (not by me!) in ways that were gratuitously incompatible
with 3.1.  It's too late in the release cycle for 3.2 to do much about this, but
you'll be happy to know that Tomcat 4.0 returns to the approach used in Tomcat
3.1 (using the "conf/web.xml" file as global defaults for all web apps).

Note, however, that reliance on this configuration mechanism is Tomcat specific.
Basically, you should look at things this way:  "things inside my web app's
/WEB-INF/web.xml file are portable -- anything else is not.

> Rachel

Craig McClanahan

View raw message