use of org.jboss.wsf.spi.deployment.WSFServlet in project wildfly by wildfly.
the class EndpointPublisherImpl method addServlets.
private static void addServlets(JBossWebMetaData jbwebMD, WebDeploymentBuilder deployment) {
for (JBossServletMetaData smd : jbwebMD.getServlets()) {
final String sc = smd.getServletClass();
if (sc.equals(WSFServlet.class.getName())) {
ServletBuilder servletBuilder = new ServletBuilder();
final String servletName = smd.getServletName();
List<ParamValueMetaData> params = smd.getInitParam();
List<String> urlPatterns = null;
for (ServletMappingMetaData smmd : jbwebMD.getServletMappings()) {
if (smmd.getServletName().equals(servletName)) {
urlPatterns = smmd.getUrlPatterns();
servletBuilder.addUrlMappings(urlPatterns);
break;
}
}
WSFServlet wsfs = new WSFServlet();
servletBuilder.setServletName(servletName);
servletBuilder.setServlet(wsfs);
servletBuilder.setServletClass(WSFServlet.class);
for (ParamValueMetaData param : params) {
servletBuilder.addInitParam(param.getParamName(), param.getParamValue());
}
deployment.addServlet(servletBuilder);
}
}
}
Aggregations