private static Node createNode(final ServletContext servletContext) throws ServletException {
String contextPath = initContextPath(servletContext);
String contributionRoot = getContributionRoot(servletContext);
NodeFactory factory = NodeFactory.newInstance();
String webComposite = getWebComposite(servletContext);
Node node = factory.createNode(contextPath, webComposite, new Contribution(contributionRoot, contributionRoot));
node.start();
return node;
}
private static String getWebComposite(ServletContext servletContext) {