context.setParentClassLoader(classLoader);
context.setDelegate(true);
// Tomcat has a stupid rule where a life cycle listener must set
// configured true, or it will treat it as a failed deployment
context.addLifecycleListener(new LifecycleListener() {
public void lifecycleEvent(LifecycleEvent event) {
Context context = (Context) event.getLifecycle();
if (event.getType().equals(Lifecycle.BEFORE_START_EVENT)) {
context.getServletContext().setAttribute(IGNORE_CONTEXT, "true");