|
@@ -330,6 +330,12 @@ public class HttpServer implements FilterContainer {
|
|
Context logContext = new Context(parent, "/logs");
|
|
Context logContext = new Context(parent, "/logs");
|
|
logContext.setResourceBase(logDir);
|
|
logContext.setResourceBase(logDir);
|
|
logContext.addServlet(AdminAuthorizedServlet.class, "/*");
|
|
logContext.addServlet(AdminAuthorizedServlet.class, "/*");
|
|
|
|
+ if (conf.getBoolean(
|
|
|
|
+ CommonConfigurationKeys.HADOOP_JETTY_LOGS_SERVE_ALIASES,
|
|
|
|
+ CommonConfigurationKeys.DEFAULT_HADOOP_JETTY_LOGS_SERVE_ALIASES)) {
|
|
|
|
+ logContext.getInitParams().put(
|
|
|
|
+ "org.mortbay.jetty.servlet.Default.aliases", "true");
|
|
|
|
+ }
|
|
logContext.setDisplayName("logs");
|
|
logContext.setDisplayName("logs");
|
|
setContextAttributes(logContext, conf);
|
|
setContextAttributes(logContext, conf);
|
|
defaultContexts.put(logContext, true);
|
|
defaultContexts.put(logContext, true);
|