addFilterMapping(webApp, FILTER_NAME, DISPATCHER_SERVLET_NAME,
FilterMappingType.SERVLET_NAME, FilterMappingDispatcher.REQUEST);
WelcomeFileList welcomeFiles = webApp.getSingleWelcomeFileList();
if (welcomeFiles == null) {
try {
welcomeFiles = (WelcomeFileList) webApp.createBean("WelcomeFileList");
webApp.setWelcomeFileList(welcomeFiles);
} catch (ClassNotFoundException ex) {
Exceptions.printStackTrace(ex);
}
}
if (welcomeFiles.sizeWelcomeFile() == 0) {
welcomeFiles.addWelcomeFile("index.jsp");
}
webApp.write(dd);
log.info("web.xml modified");