mappingSet = true;
} else {
JAXRS_LOGGER.noServletMappingFound(servletName);
return;
}
ServletMappingMetaData mapping = new ServletMappingMetaData();
mapping.setServletName(servletName);
mapping.setUrlPatterns(patterns);
if (webdata.getServletMappings() == null) {
webdata.setServletMappings(new ArrayList<ServletMappingMetaData>());
}
webdata.getServletMappings().add(mapping);
}
//add a servlet named after the application class
JBossServletMetaData servlet = new JBossServletMetaData();
servlet.setName(servletName);
servlet.setServletClass(HttpServlet30Dispatcher.class.getName());
servlet.setAsyncSupported(true);
addServlet(webdata, servlet);
}
if (!mappingSet) {
//now we need tell resteasy it's relative path
final List<ServletMappingMetaData> mappings = webdata.getServletMappings();
if (mappings != null) {
for (final ServletMappingMetaData mapping : mappings) {
if (mapping.getServletName().equals(servletName)) {
if (mapping.getUrlPatterns() != null) {
for (String pattern : mapping.getUrlPatterns()) {
if (mappingSet) {
JAXRS_LOGGER.moreThanOneServletMapping(servletName, pattern);
} else {
mappingSet = true;
String realPattern = pattern;