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.
> On 23 Apr 2001 16:26:04 -0700, [EMAIL PROTECTED] wrote:
> > can't you map the name index.html to your servlet in the web.xml file?
> > or you can change the index file name to point to your servlet.
> > Filip
> >
> > ~
> > Namaste - I bow to the divine in you
> > ~
> > Filip Hanik
> > Software Architect
> > [EMAIL PROTECTED]
> > www.filip.net
> >
> > > -----Original Message-----
> > > From: Chris Bailey [mailto:[EMAIL PROTECTED]]
> > > Sent: Monday, April 23, 2001 4:18 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: How do I map www.blah.com to a servlet?
> > >
> > >
> > > I'm using Linux, Apache 1.3.19, Tomcat 3.2.1, mod_jk. I want to map a
> > > URL such as "http://www.foo.com" to a servlet. Right now I do this by
> > > just mapping the default page (e.g. index.html) to a servlet. But, then
> > > index.html shows up in the URL on many further uses. Is there a
> > > different way to do it, or a way to make sure that "index.html" doesn't
> > > show up in the URL?
> > >
> > > --
> > > Chris Bailey [EMAIL PROTECTED]
> > > Wego Systems http://www.wego.com
> > >
> > >
> >
>
> --
> Chris Bailey [EMAIL PROTECTED]
> Wego Systems http://www.wego.com
>
Milt Epstein
Research Programmer
Software/Systems Development Group
Computing and Communications Services Office (CCSO)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]