On Fri, 30 Mar 2001, Todd Pfaff wrote:

> imho, since apache is generating the error message, and tomcat is
> not generating any error message (in my logs anyway), the problem is
> with the apache configuration as it relates to tomcat.  apache does
> not seem to be recognizing that tomcat should be handling the
> request and therefore does not pass it on.  it just tried to resolve
> the url itself, fails and reports the 404 error.  this is just my
> interpretation, i don't know if it's correct.

I agree.  And I believe this means it's a matter of adding the
appropriate Mount directives to the tomcat/apache conf file.


> On Fri, 30 Mar 2001, Milt Epstein wrote:
> 
> > On Fri, 30 Mar 2001, Kyle Tippetts wrote:
> > 
> > > 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....
> > 
> > Now again, when this doesn't work, is it an apache thing or a tomcat
> > thing?  What I'm trying to get at is, is apache forwarding the request
> > to tomcat.  That will help isolate where the problem is at.  In
> > particular, if it's an apache thing, it means the request isn't even
> > getting to tomcat, so it probably has to do with the relevant Mount
> > (ApJServMount, ApJkMount) directives in the tomcat/apache conf file
> > (or, more accurately, the lack of such).  This is a problem I ran into
> > when I was setting up some stuff.
> > 
> > Did you see Jeff Kilbride's recent post?  Apparently he was able to
> > get it to work by adding an appropriate ApJkMount directive.
> > 
> > This does seem to be one of the less clear/less well-documented
> > aspects of setting tomcat up.
> > 
> > 
> > > -----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]
> > 
> > 
> 
> --
> Todd Pfaff                         \  Email: [EMAIL PROTECTED]
> Computing and Information Services  \ Voice: (905) 525-9140 x22920
> ABB 132                              \  FAX: (905) 528-3773
> McMaster University                   \
> Hamilton, Ontario, Canada  L8S 4M1     \
> 

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