Editing web.xml could be simplified, as suggested in the above forum post. Maybe something like:
This would seem to resolve a number of hickups we encountered during development of add-ons to date like filter/filter-mapping ordering semantics etc.
It might be better to put this into a metadata object instead of provide a builder. It's also appropriate to review the web.xml fragmentation capabilities being considered in Servlet Spec 3 if building a metadata object.