tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <rmannibu...@gmail.com>
Subject Re: tomcat & deploywar & context.xml
Date Mon, 21 May 2012 19:07:57 GMT
ok thank you for the quick answer

sorry to have missed it on the website

- Romain


2012/5/21 Konstantin Kolinko <knst.kolinko@gmail.com>

> 2012/5/21 Romain Manni-Bucau <rmannibucau@gmail.com>:
> > Hi,
> >
> > how does tomcat manage context.xml at startup?
> >
> > from what i saw it uses org.apache.catalina.startup.HostConfig.DeployWar
> > but in org.apache.catalina.startup.HostConfig#deployWAR it reads the
> > context.xml file before overriding it with contextname info which ignores
> > the context.xml file:
> >
> >            context.setName(cn.getName());
> >            context.setPath(cn.getPath());
> >            context.setWebappVersion(cn.getVersion());
> >            context.setDocBase(cn.getBaseName() + ".war");
> >
> >
> > did i miss sthg or is it a bug?
> >
>
> 1. There are several context.xml files  (App's context.xml, Host's
> "context.xml.default" file, common conf/context.xml). See Context in
> config. reference for details.
>
> 2. App's context.xml is read twice, with different configuration of
> Digester.
>
> When it is read by the second time, the name etc. are ignored.
>
> That relates with the following documented feature: You cannot specify
> path attribute on Context in app's own context.xml, because it is
> already known a-priori from the name and location of the context file
> itself.
>
> The name and version are calculated from path.
>
> The same with docBase.
>
> Best regards,
> Konstantin Kolinko
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message