org.mortbay.jetty.servlet.Context.setDisplayName()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(6.0k)|赞(0)|评价(0)|浏览(132)

本文整理了Java中org.mortbay.jetty.servlet.Context.setDisplayName()方法的一些代码示例,展示了Context.setDisplayName()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Context.setDisplayName()方法的具体详情如下:
包路径:org.mortbay.jetty.servlet.Context
类名称:Context
方法名:setDisplayName

Context.setDisplayName介绍

暂无

代码示例

代码示例来源:origin: org.apache.tajo/tajo-core

/**
 * Add default apps.
 * 
 * @param appDir
 *          The application directory
 * @throws IOException
 */
protected void addDefaultApps(ContextHandlerCollection parent,
  final String appDir, Configuration conf) throws IOException {
 // set up the context for "/logs/" if "hadoop.log.dir" property is defined.
 String logDir = System.getProperty("tajo.log.dir");
 if (logDir != null) {
  Context logContext = new Context(parent, "/logs");
  logContext.setResourceBase(logDir);
  //logContext.addServlet(AdminAuthorizedServlet.class, "/*");
  logContext.setDisplayName("logs");
  defaultContexts.put(logContext, true);
 }
 // set up the context for "/static/*"
 Context staticContext = new Context(parent, "/static");
 staticContext.setResourceBase(appDir + "/static");
 staticContext.addServlet(DefaultServlet.class, "/*");
 staticContext.setDisplayName("static");
 defaultContexts.put(staticContext, true);
}

代码示例来源:origin: apache/tajo

/**
 * Add default apps.
 * 
 * @param appDir
 *          The application directory
 * @throws IOException
 */
protected void addDefaultApps(ContextHandlerCollection parent,
  final String appDir, Configuration conf) throws IOException {
 // set up the context for "/logs/" if "hadoop.log.dir" property is defined.
 String logDir = System.getProperty("tajo.log.dir");
 if (logDir != null) {
  Context logContext = new Context(parent, "/logs");
  logContext.setResourceBase(logDir);
  //logContext.addServlet(AdminAuthorizedServlet.class, "/*");
  logContext.setDisplayName("logs");
  defaultContexts.put(logContext, true);
 }
 // set up the context for "/static/*"
 Context staticContext = new Context(parent, "/static");
 staticContext.setResourceBase(appDir + "/static");
 staticContext.addServlet(DefaultServlet.class, "/*");
 staticContext.setDisplayName("static");
 defaultContexts.put(staticContext, true);
}

代码示例来源:origin: io.fabric8/fabric-hadoop

"org.mortbay.jetty.servlet.Default.aliases", "true");
 logContext.setDisplayName("logs");
 setContextAttributes(logContext);
 defaultContexts.put(logContext, true);
staticContext.setResourceBase(appDir + "/static");
staticContext.addServlet(DefaultServlet.class, "/*");
staticContext.setDisplayName("static");
setContextAttributes(staticContext);
defaultContexts.put(staticContext, true);

代码示例来源:origin: com.github.jiayuhan-it/hadoop-common

"org.mortbay.jetty.servlet.Default.aliases", "true");
 logContext.setDisplayName("logs");
 setContextAttributes(logContext, conf);
 addNoCacheFilter(webAppContext);
staticContext.setResourceBase(appDir + "/static");
staticContext.addServlet(DefaultServlet.class, "/*");
staticContext.setDisplayName("static");
setContextAttributes(staticContext, conf);
defaultContexts.put(staticContext, true);

代码示例来源:origin: io.hops/hadoop-common

"org.mortbay.jetty.servlet.Default.aliases", "true");
 logContext.setDisplayName("logs");
 setContextAttributes(logContext, conf);
 addNoCacheFilter(webAppContext);
staticContext.setResourceBase(appDir + "/static");
staticContext.addServlet(DefaultServlet.class, "/*");
staticContext.setDisplayName("static");
setContextAttributes(staticContext, conf);
defaultContexts.put(staticContext, true);

代码示例来源:origin: io.hops/hadoop-common

"org.mortbay.jetty.servlet.Default.aliases", "true");
 logContext.setDisplayName("logs");
 setContextAttributes(logContext, conf);
 addNoCacheFilter(webAppContext);
staticContext.setResourceBase(appDir + "/static");
staticContext.addServlet(DefaultServlet.class, "/*");
staticContext.setDisplayName("static");
setContextAttributes(staticContext, conf);
defaultContexts.put(staticContext, true);

代码示例来源:origin: ch.cern.hadoop/hadoop-common

"org.mortbay.jetty.servlet.Default.aliases", "true");
 logContext.setDisplayName("logs");
 setContextAttributes(logContext, conf);
 addNoCacheFilter(webAppContext);
staticContext.setResourceBase(appDir + "/static");
staticContext.addServlet(DefaultServlet.class, "/*");
staticContext.setDisplayName("static");
setContextAttributes(staticContext, conf);
defaultContexts.put(staticContext, true);

代码示例来源:origin: com.github.jiayuhan-it/hadoop-common

"org.mortbay.jetty.servlet.Default.aliases", "true");
 logContext.setDisplayName("logs");
 setContextAttributes(logContext, conf);
 addNoCacheFilter(webAppContext);
staticContext.setResourceBase(appDir + "/static");
staticContext.addServlet(DefaultServlet.class, "/*");
staticContext.setDisplayName("static");
setContextAttributes(staticContext, conf);
defaultContexts.put(staticContext, true);

代码示例来源:origin: ch.cern.hadoop/hadoop-common

"org.mortbay.jetty.servlet.Default.aliases", "true");
 logContext.setDisplayName("logs");
 setContextAttributes(logContext, conf);
 addNoCacheFilter(webAppContext);
staticContext.setResourceBase(appDir + "/static");
staticContext.addServlet(DefaultServlet.class, "/*");
staticContext.setDisplayName("static");
setContextAttributes(staticContext, conf);
defaultContexts.put(staticContext, true);

代码示例来源:origin: io.hops/hadoop-common

"org.mortbay.jetty.servlet.Default.aliases", "true");
 logContext.setDisplayName("logs");
 SessionHandler handler = new SessionHandler();
 SessionManager sm = handler.getSessionManager();
staticContext.setResourceBase(appDir + "/static");
staticContext.addServlet(DefaultServlet.class, "/*");
staticContext.setDisplayName("static");
@SuppressWarnings("unchecked")
Map<String, String> params = staticContext.getInitParams();

相关文章