On Wed, 22 Aug 2001, Vladimir Grishchenko wrote:
> Thanks for the clarification, it makes sense.
> Is it according to the spec or just a peculiarity of Tomcat?
>
Servlet 2.3 PFD2, Section 3.1 (emphasis added by **):
A ServletContext is rooted at *a* known
path within the web server. For example,
a servlet context could be located at
http://www.mycorp.com/catalog. All requests
that begin with the /catalog request path,
known as the context path, are routed to
the web application associated with the
servlet context.
> Actually, I need just the opposite, is there any way to do this? Meaning
> different context paths - one webapp and one class loader...
>
Not that I know of.
Of course, that begs the question of *why* you need this -- if everything
is identical (as it would be if you got your wish), then what's the point?
> Thanks,
> --V.
>
Craig
> ----- Original Message -----
> From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, August 22, 2001 9:41 AM
> Subject: Re: multiple context paths pointing to the same doc base?
>
>
> >
> >
> > On Wed, 22 Aug 2001, Vladimir Grishchenko wrote:
> >
> > > Hi there,
> > >
> > > May be somebody can give me a quick answer with regards to T3.2.2.
> > >
> > > I need to have multiple context paths to point to the same doc base,
> > > say my server.xml has the following entries:
> > >
> > > <Context path="/somectx"
> > > docBase="d:/foo/bar"
> > > debug="0"
> > > reloadable="false" >
> > > </Context>
> > >
> > >
> > > <Context path="/somectx1"
> > > docBase="d:/foo/bar"
> > > debug="0"
> > > reloadable="false" >
> > > </Context>
> > >
> > > Will the above config cause my webapp classes/servlets to be loaded
> > > twice through different classloaders,
> >
> > Yes.
> >
> > > or TC is smart enough to realize
> > > it's the same webapp?
> > >
> >
> > It is *not* the same webapp.
> >
> > Every webapp must have a unique context path, and you have just defined
> > two different context paths here. The fact that the document base is the
> > same is just a coincidence.
> >
> > > Thanks,
> > > --V.
> > >
> >
> > Craig
> >
> >
> >
>