本文整理了Java中org.mortbay.jetty.servlet.Context.setDisplayName()
方法的一些代码示例,展示了Context.setDisplayName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Context.setDisplayName()
方法的具体详情如下:
包路径:org.mortbay.jetty.servlet.Context
类名称: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();
内容来源于网络,如有侵权,请联系作者删除!