tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrey Akselrod" <aaksel...@runtime.com>
Subject RE: IllegalStateException - tomcat 4
Date Thu, 15 Feb 2001 22:10:17 GMT
Ok - everything is as clear as it can ever be.
/servlet/* association is back and will stay. I guess the only side effect
is that I have to register all of my servlets - I include all of them from
jsp.
That is a small price to pay. I am glad I got my sanity back :)

Craig - you are the best - thank you.

-a

> -----Original Message-----
> From: Craig R. McClanahan [mailto:Craig.McClanahan@eng.sun.com]
> Sent: Thursday, February 15, 2001 4:40 PM
> To: tomcat-user@jakarta.apache.org
> Subject: Re: IllegalStateException - tomcat 4
>
>
> Andrey Akselrod wrote:
>
> > Craig, Michael,
> >
> > thank you for your help!
> >
> > Craig, your last email explained everything - thank you. I am a lot less
> > stressed now :) I have a few questions though.
> >
> > Instead of mapping each servlet I just removed /servlet/*
> invoker mapping.
>
> >From where did you remove it?  If you removed it from the
> $CATALINA_HOME/conf/web.xml file, you should have broken
> "invoker" service for
> all of the webapps -- in other words, JSP pages would still work
> and servlets
> explicitly mapped would still work, but anything accessed by
> /servlet/xxxxx
> would now return 404s.
>
> If you don't have any /servlet/xxxxx URIs, then there will be no harm in
> removing this mapping.
>
> >
> > It worked after that. Is it safe to do so? What does the invoker do?
>
> The invoker, umm, err, invokes servlets :-)
>
> Actually, it is there to emulate the hard-coded behavior of
> servlet containers
> that existed prior to the development of web applications in the
> 2.2 spec.  The
> invoker looks at the path info (after the "/servlet" path that is
> mapped to
> itself), and tries to find either a servlet with that name, or a
> Java class with
> that name, and then executes that as a servlet.  In effect, it
> lets you register
> servlets without defining them in the web.xml file.
>
> >
> > I took a look at the source code - and realized that you wrote it!
>
> A pretty large majority of the servlet container code in Tomcat
> 4.0 (as opposed
> to the JSP stuff) is my original code, but there have been tons
> of important
> contributions from others as well.
>
> > Thanks
> > for taking your time to explain it all...
> > Anyway, why do you forward instead of include in there?
>
> If we used include, the invoked servlet would not be able to set response
> headers or cookies -- see the servlet spec for details.  That
> would be decidedly
> unuseful.
>
> > How come Tomcat
> > works without this association (/servlet/*)?
> >
>
> Tomcat 3.1 used an invoker servlet mapped to "/servlet/*" in the
> global web.xml
> file, exactly as Tomcat 4.0 does.  Tomcat 3.2 arbitrarily changed
> the way this
> is configured (not my idea, but that's a different story) to a request
> interceptor that accomplishes essentially the same task, but
> without using a
> servlet to perform the invoking.
>
> But I do feel compelled to warn you one more time -- web apps
> that depend on the
> invoker functionality are *NOT* guaranteed to be portable to other servlet
> containers (support for this is common, but is not required by the servlet
> specification).  Web apps that use explicit servlet mappings are.
>
> >
> > Thank you again,
> > -a
> >
>
> Craig
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, email: tomcat-user-help@jakarta.apache.org
>
>


Mime
View raw message