On 14/10/2011 00:20, Mark Thomas wrote: > On 14/10/2011 00:07, Konstantin Kolinko wrote: >> 2011/10/14 <ma...@apache.org>: >>> Author: markt >>> Date: Thu Oct 13 22:28:22 2011 >>> New Revision: 1183142 >>> >>> URL: http://svn.apache.org/viewvc?rev=1183142&view=rev >>> Log: >>> Cache the result of parsing global and host defaults for web.xml to speed >>> up web application start. >>> This change reduces applciation start time by ~15% with trunk and the TCK >>> web apps > > Getting late here. I'll look at fixing the issues this change introduced > tomorrow.
These issues should be fixed now. Mark >>> >>> Modified: >>> tomcat/trunk/java/org/apache/catalina/startup/Constants.java >>> tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java >>> tomcat/trunk/java/org/apache/catalina/startup/LocalStrings.properties >>> >>> Modified: tomcat/trunk/java/org/apache/catalina/startup/Constants.java >>> URL: >>> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/Constants.java?rev=1183142&r1=1183141&r2=1183142&view=diff >>> ============================================================================== >>> --- tomcat/trunk/java/org/apache/catalina/startup/Constants.java (original) >>> +++ tomcat/trunk/java/org/apache/catalina/startup/Constants.java Thu Oct 13 >>> 22:28:22 2011 >>> @@ -34,7 +34,7 @@ public final class Constants { >>> public static final String ApplicationContextXml = >>> "META-INF/context.xml"; >>> public static final String ApplicationWebXml = "/WEB-INF/web.xml"; >>> public static final String DefaultContextXml = "conf/context.xml"; >>> - public static final String DefaultWebXml = "conf/web.xml"; >>> + public static final String DefaultWebXml = "web.xml"; >>> public static final String HostContextXml = "context.xml.default"; >>> public static final String HostWebXml = "web.xml.default"; >> >> 1. Regarding the above change to DefaultWebXml constant: >> >> Looking where it is used: >> 1) it is returned by ContextConfig#getDefaultWebXml() >> 2) ContextConfig#getGlobalWebXml() calls >> a) ContextConfig#getDefaultWebXml() >> b) ((StandardContext) context).getDefaultWebXml() >> >> so that the value could be overwritten in StandardContext. >> >> Javadoc for StandardContext#setDefaultContextXml() says that the value >> is relative to catalina.base. This is now broken. >> >> >> 2. Later in ContextConfig#getGlobalWebXml() : >> + return new File(basePath, defaultWebXml); >> and elsewhere >> + return new File(basePath, resourceName); >> >> The above does not work if defaultWebXml is absolute. The simple jsp below >> prints C:\workspace\C:\workspace on JDK 6u26 on WinXP: >> <%= new java.io.File("C:\\workspace", "C:\\workspace") %> >> >> So absolute paths for StandardContext defaultWebXml setting are broken as >> well. >> >> Best regards, >> Konstantin Kolinko >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: dev-h...@tomcat.apache.org >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org