You are viewing a plain text version of this content. The canonical link for it is here.
Posted to watchdog-dev@jakarta.apache.org by "Rousseau, John" <JR...@silverstream.com> on 2000/07/13 22:46:17 UTC
Implicit /servlet path
I'm looking at the ServletContext.GetRequestDispatcherTestServlet
test (but I see the same thing with other tests).
It's doing a getRequestDispatcher() on
"/servlet/tests.javax_servlet.ServletContext.GetRequestDispatcher".
I don't see "/servlet" in the deployment descriptor, nor do I see
any documentation about getRequestDispatcher taking a '.' separated
class name. There is clearly no "/servlet" directory in the WAR.
Is there an implicit mapping that Apache uses, or am I just missing
something?
Thanks!
-John
----------------------------------------------------------------
John Rousseau jrr@silverstream.com
SilverStream Software Phone: +1 978 262 3564
2 Federal Street Fax: +1 978 262 3499
Billerica, MA 01821 http://www.silverstream.com
----------------------------------------------------------------
Re: Implicit /servlet path
Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
"Rousseau, John" wrote:
> I'm looking at the ServletContext.GetRequestDispatcherTestServlet
> test (but I see the same thing with other tests).
>
> It's doing a getRequestDispatcher() on
> "/servlet/tests.javax_servlet.ServletContext.GetRequestDispatcher".
>
> I don't see "/servlet" in the deployment descriptor, nor do I see
> any documentation about getRequestDispatcher taking a '.' separated
> class name. There is clearly no "/servlet" directory in the WAR.
>
> Is there an implicit mapping that Apache uses, or am I just missing
> something?
>
Yes, Tomcat uses a default mapping for "/servlet" to an invoker servlet
that takes the "path info" part of the path and tries to find a servlet
with that <servlet-name>, or a servlet with that class name.
This is an issue I have raised with the authors of the servlet tests,
because there is no requirement in the spec that a servlet container
provide such an invoker. My understanding is that the tests are going
to be changed to provide explicit <servlet-mapping> entries for all
addressable servlets, and the tests will use those paths.
>
> Thanks!
> -John
>
Craig McClanahan