path = j > 0 ? path.substring(0, j + 1): "/";
} else {
final Execution exec = Executions.getCurrent();
if (exec != null) path = exec.getDesktop().getCurrentDirectory();
}
<BUG>final Object ctx = wapp.getNativeContext();
if (ctx instanceof ServletContext)
return new ServletContextLocator((ServletContext)ctx, path);

throw new UnsupportedOperationException("Unknown context: "+ctx);</BUG>
}

path = j > 0 ? path.substring(0, j + 1): "/";
} else {
final Execution exec = Executions.getCurrent();
if (exec != null) path = exec.getDesktop().getCurrentDirectory();
}
return new ServletContextLocator(wapp.getServletContext(), path);
}
