this.listenerClasses.clear();
this.contextListeners.clear();
this.servlets.clear();
this.filters.clear();
IWebXml webXml = application.getWebXml();
for (IWebXmlListener listener : webXml.getListeners()) {
this.listenerClasses.add(listener.getListenerClass());
}
for (IWebXmlFilter filter : webXml.getFilters()) {
MockFilterSetup setup = new MockFilterSetup(wrapper, filter);
for (IWebXmlFilterMapping mapping : WebXmlUtil.getMappings(webXml, filter)) {
setup.urlPatterns.addAll(mapping.getPatterns());
}
this.filters.put(filter.getFilterName(), setup);
}
for (IWebXmlServlet servlet : webXml.getServlets()) {
MockServletSetup setup = new MockServletSetup(wrapper, servlet, WebXmlUtil.getFilterNames(webXml, servlet));
for (IWebXmlServletMapping mapping : WebXmlUtil.getMappings(webXml, servlet)) {
setup.urlPatterns.addAll(mapping.getPatterns());
}
this.servlets.put(servlet.getServletName(), setup);