2009/11/23 Looijmans, Mike <mike.looijm...@oce.com>

> > No. You want webapps/myapp to be treated as the ROOT context
> > for a host.
> > appBase="webapps/myapp" means look in the webapps/myapp
> > directory to find contexts for this host. The ROOT context in
> > that case would be webapps/myapp/ROOT
> >
> > As a general rule any configuration that boils down to docBase==""
> > (which is the same as appBase==docBase) is not going to
> > behave they way you want it to.
>
>
> Since I don't understand a bit of this reply, I'll interpret it as
> "please go read the manual"...
>

The servlet spec requires a little bit of "magic".  Whatever war file you
want to deploy as the top-level one needs to be called ROOT.war, or the
files placed in a directory called ROOT.


>
>
> > > I want http://localhost/myapp/ and http://localhost:666/ to
> > mean the
> > > same, so just moving the webapps root a level deeper seems
> > the logical
> > > thing to do.
> >
> > That would be logical if the file system mapped directly to
> > the web URL space but it doesn't.
>
> Probably the word "apache" has lead me into believing that tomcat would
> behave like other webservers: Just point it to some root location and
> then it will follow the filesystem.
>
> Yeah.  Unfortunately the servlet spec has other ideas, and Tomcat follows
the spec.  Much of the reason Tomcat's own documentation seems to have bits
missing is that it doesn't duplicate the bits from the spec.  If you haven't
at least skim-read the spec, I'd suggest doing so - it makes a lot of
Tomcat's "odd" behaviour much clearer.

- Peter

Reply via email to