tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: [PROPOSAL] Enable session replication by default.
Date Wed, 08 Jun 2011 00:02:27 GMT
On 07/06/2011 22:42, Konstantin Kolinko wrote:
> BTW, two minor thoughts wrt. o.a.c.startup.ContextConfig#webConfig()
> 1) Line 1208
> 
>         // Parse host level web.xml if present
>         // Additive apart from welcome pages
>         webXml.setReplaceWelcomeFiles(true);
>         InputSource hostWebXml = getHostWebXmlSource();
>         parseWebXml(hostWebXml, webXmlDefaultFragment, false);
> 
> The "webXml.setReplaceWelcomeFiles(true);" call is needed,

I don't think it is since webXml is now empty when the main web.xml is
parsed into it.

> but from the comment it seems to me that
> webXmlDefaultFragment.setReplaceWelcomeFiles(true); is also needed
> here,
> because webXmlDefaultFragment is the argument to parseWebXml() call
> and not webXml.

Yep, that does look to be required. Hmm. Looks like it is no longer
possible to override the welcome files in an app's web.xml. That'll need
fixing too.

> 2)
> Line 1223:
> All of the code below
>         // Assuming 0 is safe for what is required in this case
>         double webXmlVersion = 0;
>         if (webXml.getVersion() != null) {
>             webXmlVersion = Double.parseDouble(webXml.getVersion());
>         }
> 
>         if (webXmlVersion >= 3) {
>  Just can be replaced with one line
>         if (webXml.getMajorVersion() >= 3) {
> 
> Note, that webXml.getVersion() never returns null.

Fixed. Thanks.

Mark



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message