public static void addDispatchers ( Document doc , Element filterMapping , String ... names ) { if ( names != null ) { for ( String name : names ) { Element dispatcher = doc . createElement ( "dispatcher" ) ; dispatcher . appendChild ( doc . createTextNode ( name ) ) ; filterMapping . appendChild ( dispatcher ) ; } } }
Adds dispatchers for each item in the vargs parameter names to a filter mapping element of a web . xml file .