Community
Participate
Working Groups
Build Identifier: 8.0.0.M1 It would be "nice", convenient for development, if when during the loading web-fragment.xml, the fragment has a <name> that has already been seen, the fragment would get rejected. I've noticed that while Jetty appears to be just happy with a WAR having two fragments with the same name, Apache Tomcat 7.0.4 ignores one of them, without warning log - leading to a kind of hard to detect & confusing "problem" (which is easily fixed, by changing one of the names - once you know about the problem). It's probably fairly easy to implement this, may just be something like an if (_webFragmentNameMap.containsKey(descriptor.getName())) throw new ...Exception() in MetaData.addFragment() before _webFragmentNameMap.put(descriptor.getName(), descriptor);? Haven't tried. Reproducible: Always
PS, actually sorry, correcting myself: The best behavior IMHO would actually not be that "the fragment would get rejected" as I wrote, but to refuse the entire WebApp, with a clear log & exception as to why.
Fixed in jetty-8 trunk rev 2500.
Resolved -> Closed