2011/6/22 <[email protected]>:
> Author: markt
> Date: Wed Jun 22 18:30:41 2011
> New Revision: 1138573
>
> URL: http://svn.apache.org/viewvc?rev=1138573&view=rev
> Log:
> Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=51418
> Provide more control over Context creation when embedding Tomcat.
> Based on a patch by Benson Margulies.
>
> Modified:
> tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java
> tomcat/trunk/webapps/docs/changelog.xml
>
> + public String noDefaultWebXmlPath() {
> + return "org/apache/catalin/startup/NO_DEFAULT_XML";
> + }
A typo in the above constant does not prevent it from working, but
somehow bugs me.
Searching for the string finds 4 places where it is used literally.
And now it becomes part of API.
Maybe
1) s/catalin/catalina/
2) add it to o.a.c.startup.Constants, e.g. named as NoDefaultWebXml
3) use the value to short-circuit
ContextConfig#getWebXmlSource(defaultWebXml, baseDir) to return null
An alternative to 2)+3) is to put the constant into
DefaultWebXmlListener, but I like 2)+3) better.
Best regards,
Konstantin Kolinko
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]