Yes, tried this:
        mydomain.com/test/foo/bar/myServlet
and it still didn't work. Now, if I do
mydomain.com/test/servlet/requestMap.Servlet1, I can access it (obviously),
but again, it really appears that servlet mappings aren't working....

--Kyle

-----Original Message-----
From: Milt Epstein [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 30, 2001 2:43 PM
To: [EMAIL PROTECTED]
Subject: Re: 2nd Post: Servlets and mod_jk problem


On Fri, 30 Mar 2001, Jeff Kilbride wrote:

[ ... ]
> Here's the servlet-mapping from web.xml file that comes with the
> distribution:
> <servlet>
>     <servlet-name>
>         servlet1
>     </servlet-name>
>     <servlet-class>
>         requestMap.Servlet1
>     </servlet-class>
> </servlet>
> 
> <servlet-mapping>
>     <servlet-name>
>         servlet1
>     </servlet-name>
>     <url-pattern>
>         /foo/bar/*
>     </url-pattern>
> </servlet-mapping>
> 
> Here's a snippet from my tomcat.log when I try to pull up
> mydomain.com/test/servlet/foo/bar/myServlet:
> 985983892264 - Ctx( /test ): 404 R( /test + /servlet/foo + /bar/myServlet)
> null

Did you try the URL:

mydomain.com/test/foo/bar/myServlet

i.e. without the "/servlet"?  My impression is that the url-pattern's
in servlet-mapping's are meant to follow the context part of the URL,
and that you don't need to include "/servlet" (although you do need to
include it if you are just using the servlet-name or the fully
qualified servlet-class).  That is, part of the point of using
servlet-mapping's is so you don't need to have the "/servlet" in the
URL.  This might explain some of your apparent anomalies when using
"test" (you had it both as the servlet-name and the url-pattern in a
servlet-mapping, IIRC).


> This mapping is supposed to map everything under /servlet/foo/bar/ to
> servlet1 -- but as you can see, Tomcat is saying /servlet/foo, with extra
> path info /bar/myServlet, doesn't exist. When I pull up
> mydomain.com/test/servlet/requestMap.Servlet1 or
> mydomain.com/test/servlet/servlet1, everything works as it should. So,
> Tomcat is not paying attention to the servlet-mapping entry.
> 
> I think this is a problem, unless somebody has an explanation. I'm out of
> ideas.
[ ... ]

Milt Epstein
Research Programmer
Software/Systems Development Group
Computing and Communications Services Office (CCSO)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]

Reply via email to