if (webSubSystem.isDefined() && webSubSystem.hasDefined("context-root")) {
final String contextName = webSubSystem.get("context-root").asString();
if (webSubSystem.hasDefined(SERVLET)) {
for (final ModelNode servletNode : webSubSystem.get(SERVLET).asList()) {
for (final String servletName : servletNode.keys()) {
context.add(new Servlet(servletName, toContextName(contextName)));
}
}
}
/*
* This is a WebApp, it has some form of webcontext whether it has a
* Servlet or not. AS7 does not expose jsp / default servlet in mgm api
*/
context.add(new Servlet("default", toContextName(contextName)));
}
}
}
}