Re: Servlet invoker woes - servlet-mapping /servlets/* to invoker fails on 3.2

2000-11-21 Thread Rachel Greenham

On Monday 20 November 2000 19:16, you wrote:

> 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

Well, this was essentially my original question - I missed your earlier 
pronouncements on the matter - I joined the list specifically to ask the 
question after an answer didn't come up on searching the archives.

> 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.

That's what I reckoned; I've been poring over the specification. We *are* 
going over to using servlet aliases - we're just going to write up something 
that auto-generates our WEB-INF/web.xml. We're already auto-generating our 
.tld files.

-- 
Rachel



Re: Servlet invoker woes - servlet-mapping /servlets/* to invoker fails on 3.2

2000-11-20 Thread Craig R. McClanahan

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:
> >
> >  > 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 ([EMAIL PROTECTED]).

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





Re: Servlet invoker woes - servlet-mapping /servlets/* to invoker fails on 3.2

2000-11-20 Thread Rachel Greenham

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:
>
>  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.

> 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.

-- 
Rachel



Re: Servlet invoker woes - servlet-mapping /servlets/* to invoker fails on 3.2

2000-11-17 Thread Craig R. McClanahan

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:



and you can change the prefix attribute to "/servlets/" for your particular case.

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.

Craig McClanahan


Rachel Greenham wrote:

> As subject: Our website uses a large number of servlets reference through
> URLs of the form /servlets/. We got this to work
> on Tomcat 3.1 by putting in a servlet-mapping tag in the webapp's WEB-INF
> file thus:
>
> 
> 
> 
> invoker
> 
> 
> /servlets/*
> 
> 
>
> However, this doesn't work in Tomcat 3.2 beta 7. Instead I have had to alter
> the RequestInterceptor line for the invoker in $TOMCAT_HOME/conf/server.xml
> thus, so I can get the site working today at least:
>
>  className="org.apache.tomcat.request.InvokerInterceptor"
> debug="0" prefix="/servlets/" />
>
> Furthermore, I *had* to take out the servlet-mapping tag in the web.xml file
> as well or it still wouldn't work, which means I can't use the same web.xml
> across both versions, which creates administration headaches. Also, this way,
> there's no longer a request interceptor for /servlet/* which means, for
> example, the URLs to the servlets in the "examples" webapp no longer work. In
> other words, this configuration change is global to the servlet container,
> and can break other web applications running on it. Also, I don't know if
> it's guaranteed even to work on other servlet containers.
>
> My question is:
>
> What is the *right* thing to do here, for maximum compatibility? Is the use
> of actual servlet class names in URLs now supposed to be deprecated and
> not-to-be relied upon? Should we be using servlet aliases consistently now?
> In which case we do after all need to go through all our HTML files and other
> scripts changing URLs to use servlet aliases for all our servlets. Personally
> I suspect this is the right way, and the end result would be a cleaner
> webapp, but the person who tells our web designers to do the changes is not
> going to be popular!
>
> OR...
>
> Is the current Tomcat 3.2 beta 7 behaviour wrong?
>
> OR...
>
> Is there a more definitive way of doing this servlet mapping? I thought the
> servlet-mapping tag in WEB-INF/web.xml was unproblematic myself.
>
> --
> Rachel