On Fri, 30 Mar 2001, Jeff Kilbride wrote:

> AHA!!!
> 
> Actually, using my old config, pulling up
> mydomain.com/test/foo/bar/myServlet returned an Apache 404 error. I
> had tried that initially and gave up when Apache returned the
> error. But your post turned the little lightbulb on in my head!  :o)
> 
> It makes sense that /test/foo/bar/myServlet wasn't pulling up,
> because in my original config I hadn't specified a connector for
> /test/* -- only for /test/*.jsp and /test/servlet/*, like the
> examples in mod_jk.conf-auto. So, I went back and changed my
> original config to this:
> 
> JkMount /test/*
> JkMount /test/servlet/*
> 
> And POOF!! Now everything works. The only thing that sucks is that

Great!  Glad to hear it.  I had a feeling it might be related to
missing Mount directives, because I ran into a similar
problem/solution.

> you have to serve the whole directory via Tomcat in order to use
> servlet-mappings -- HTML and all. Maybe there should be a way to
> *turn off* extensions as well as turn them *on*, so you could
> specify to Tomcat not to serve *.html.  (!*.html ??)  I wonder if
> it's documented anywhere that in order to use servlet-mappings, you
> need to do this as opposed to following the examples and
> mod_jk.conf-auto. (should be...)
[ ... ]

I agree that these aspects of the configuration aren't as well
integrated (and documented) as they should be.  It looks like if
you're not careful, you can accidentally open up things that weren't
intended to be available.  (For example, you need to put in sections
related to the META-INF and WEB-INF directories so they don't get
served.)  And there may be some negative, unintended consequences of
Mount'ing a URL pattern like "/test/*" (as you conjecture), I'm not
quite sure.


> ----- Original Message -----
> From: "Milt Epstein" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, March 30, 2001 1:42 PM
> 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).
[ ... ]

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