On 24 Apr 2001 10:25:42 -0500, [EMAIL PROTECTED] wrote:
> On 23 Apr 2001, Chris Bailey wrote:
> 
> > This is what I'm already doing (see the email below) - I map my
> > servlet to index.html in web.xml.
> 
> Here's something you can try.  I haven't tried it exactly myself,
> although I have tried something similar (i.e. having
> http://www.foo.com/bar/ go directly to a servlet).  The steps below
> are analogous to what I have done.
> 
> First, add a directive to your tomcat/apache conf file that directs
> *all* requests to tomcat's default context.  This might be something
> like:
> 
>   JkMount /* /ROOT
> 
> (I'm using mod_jserv, not mod_jk, which is an additional reason I'm
> not 100% sure of what exactly you need to do this part of it.)
> 
> Second, add a servlet-mapping for the URL "/" to the servlet you wish
> the requests to go to (I believe you'll have to have defined that
> servlet, i.e. set up a servlet-name for it).  This should go in
> tomcat's root context's web.xml file.
> 
> That's it.

This is orignally how I had it set up, but the problem was that by using
"JkMount /* /whatever", which as you said, directs _all_ requests to
Tomcat, it directs EVERY request to that domain to the servlet.  So, if
for example, I put "http://www.blah.com/test/whatever.html"; in, that
still matches "http://www.blah.com/*"; (the /* being the JkMount part),
so it goes to the servlet as well.  This is undesireable (probably in
most cases), becuase then if the browser requests say a stylesheet, or a
static HTML file or whatever, it's all going to get mapped to the
servlet.

-- 
Chris Bailey            [EMAIL PROTECTED]
Wego Systems            http://www.wego.com

Reply via email to