tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <Craig.McClana...@eng.sun.com>
Subject Re: Apache & Tomcat cooperation
Date Tue, 11 Jul 2000 17:57:20 GMT
mike niemaz wrote:

> Thank you Craig for bringing us the light ;-)
> There is one thing I don't really get :
>
>     ApJServMount /examples/servlet /examples
>
> You say that any request that starts with "/examples/servlet"
> should be passed on to Tomcat's "/examples" context for
> execution ... In which case is there such calls to examples/servlet???
>

Tomcat comes with a facility called the "invoker" which can execute servlets that are
not registered in the web.xml file.  For example, the "hello, world" servlet in the
examples is actually executed with this URL:

    http://localhost/examples/servlet/HelloWorldExample

which, according to the rule above, is passed to Tomcat's "/examples" context for
execution.  What the invoker does is looks for HelloWorldExample.class in the
WEB-INF/classes directory of the examples app (or in a JAR file in WEB-INF/lib) to
execute.

Without this ApJServMount line, Apache would try to execute this request, which would
return a "not found" response since there is no directory named "/servlet" there.

>
> --mike
>

Craig McClanahan



Mime
View raw message