Hi Rainer,
2013/4/16 Rainer Jung rainer.j...@kippdata.de
Hi Violeta,
On 16.04.2013 22:15, violet...@apache.org wrote:
Author: violetagg
Date: Tue Apr 16 20:15:28 2013
New Revision: 1468594
URL: http://svn.apache.org/r1468594
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54851
Merged revision 1468415 from tomcat/trunk:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54851
Directories without any web.xml fragments should not impact the status
of distributable. Patch provided by Trask Stalnaker.
Modified:
tomcat/tc7.0.x/trunk/ (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ContextConfig.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
Propchange: tomcat/tc7.0.x/trunk/
--
Merged /tomcat/trunk:r1468415
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ContextConfig.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ContextConfig.java?rev=1468594r1=1468593r2=1468594view=diff
==
---
tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ContextConfig.java
(original)
+++
tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ContextConfig.java
Tue Apr 16 20:15:28 2013
@@ -2719,6 +2719,10 @@ public class ContextConfig implements Li
new
InputSource(fragmentFile.toURI().toURL().toString());
source.setByteStream(stream);
parseWebXml(source, fragment, true);
+} else {
+// If there is no web.xml, normal folder no impact
on
+// distributable
+fragment.setDistributable(true);
Can this lead to distributable being set if the webapp and all
web-fragments do not have any info on distributable? That would be
bad, because by default in Tomcat webapps are not distributable. If you
have a Cluster element in your server.xml a webapp not marked as
distributable should not get replicated.
In the Servlet Specification we have the following:
8.2.3 Assembling the descriptor from web.xml, web-fragment.xml and
annotations
...
ix. The web.xml resulting from the merge is considered distributable only
if all its web fragments are marked as distributable as well.
Our merge implementation (o.a.c.deploy.WebXml.merge) checks first the
distributable element in web.xml and only if there is such distributable
flag, the second step is to check whether all fragments have distributable
flag also.
Till now in case the web fragment does not have web-fragment.xml the
distributable was marked as false thus the application cannot be marked as
distributable at all, unless a web-fragment.xml is not provided.
What do you think?
I know the below change log entry suggets the change does not set the
webapp to distributable by default, but just anted to double check.
}
} finally {
fragment.setURL(file.toURI().toURL());
Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1468594r1=1468593r2=1468594view=diff
==
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Tue Apr 16 20:15:28
2013
@@ -62,6 +62,11 @@
Update Tomcat's internal copy of Commons FileUpload to
FileUpload 1.3.
(markt)
/update
+ fix
+bug54851/bug: When scanning for web fragments, directories
without
+any web-fragment.xml should not impact the status of
distributable
+element. Patch provided by Trask Stalnaker. (violetagg)
+ /fix
/changelog
Regards,
Rainer
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org