This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Supported in Servlet 3.0.
there is a file template for web-fragment.xml... where were looking for it that you did not find it?
I looked under every category available in the new file wizard in a java ee 6 web app, but I can't find it. Where is it supposed to be?
There was discussion long time ago that web-fragment.xml has only sense in J2SE Class Library project, that is in a project in which a web framework or a support web library is being developed. So the template is available only in J2SE class library project (beware: once J2SE project has a main class it is not class library project anymore - it is j2se application project).
I guess that makes sense; I was thinking that one may want to use web-fragments to modularize web.xml even when the "modules" are not separate libraries but just logical partitions within the web app. That is a theoretic use case though, I ran into this when I was reading the spec and trying out how it works.
(In reply to comment #4) > I was thinking that one may want to use web-fragments > to modularize web.xml even when the "modules" are not separate libraries but > just logical partitions within the web app. I'm pretty sure we had discussed this scenario but I cannot remember why we decided against it and I cannot find the discussion. Vince, do you remember?
I think it is disallowed by section 8.2.1 of the spec. Paragraphs 3-5 seem to make the restriction fairly tightly. The file web-fragment.xml can only appear in the META-INF directory of a jar file. Only jar files that are packaged in WEB-INF/lib are scanned for META-INF/web-fragment.xml
(In reply to comment #6) > I think it is disallowed by section 8.2.1 of the spec. Paragraphs 3-5 seem to > make the restriction fairly tightly. It is very clear. I feel like it is first time I'm reading it. My fault. > Only jar files that are packaged in WEB-INF/lib are scanned for > META-INF/web-fragment.xml As Vince pointed out this is problem. I filed it as Bug 187624.