org.eclipse.jetty.webapp.WebAppContext.setDisplayName()方法的使用及代码示例

x33g5p2x  于2022-02-02 转载在 其他  
字(8.2k)|赞(0)|评价(0)|浏览(111)

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

WebAppContext.setDisplayName介绍

暂无

代码示例

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

/**
 * Create the web context for the application of specified name
 */
WebAppContext createWebAppContext(Builder b) {
 WebAppContext ctx = new WebAppContext();
 setContextAttributes(ctx.getServletContext(), b.contextAttrs);
 ctx.setDisplayName(b.name);
 ctx.setContextPath("/");
 ctx.setWar(appDir + "/" + b.name);
 return ctx;
}

代码示例来源:origin: jersey/jersey

context.setDisplayName("JettyContext");
context.setContextPath(path);
context.setConfigurations(new Configuration[]{new WebXmlConfiguration()});

代码示例来源:origin: org.eclipse.jetty/jetty-webapp

public void visitDisplayName(WebAppContext context, Descriptor descriptor, XmlParser.Node node)
{
  //Servlet Spec 3.0 p. 74 Ignore from web-fragments
  if (!(descriptor instanceof FragmentDescriptor))
  {
    context.setDisplayName(node.toString(false, true));
    context.getMetaData().setOrigin("display-name", descriptor);
  }
}

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

private WebAppContext loadWar(final File warFile, final String contextPath, final ClassLoader parentClassLoader) {
  final WebAppContext webappContext = new WebAppContext(warFile.getPath(), contextPath);
  webappContext.setContextPath(contextPath);
  webappContext.setDisplayName(contextPath);

代码示例来源:origin: org.apache.hadoop/hadoop-common

private static WebAppContext createWebAppContext(Builder b,
  AccessControlList adminsAcl, final String appDir) {
 WebAppContext ctx = new WebAppContext();
 ctx.setDefaultsDescriptor(null);
 ServletHolder holder = new ServletHolder(new DefaultServlet());
 Map<String, String> params = ImmutableMap. <String, String> builder()
     .put("acceptRanges", "true")
     .put("dirAllowed", "false")
     .put("gzip", "true")
     .put("useFileMappedBuffer", "true")
     .build();
 holder.setInitParameters(params);
 ctx.setWelcomeFiles(new String[] {"index.html"});
 ctx.addServlet(holder, "/");
 ctx.setDisplayName(b.name);
 ctx.setContextPath("/");
 ctx.setWar(appDir + "/" + b.name);
 String tempDirectory = b.conf.get(HTTP_TEMP_DIR_KEY);
 if (tempDirectory != null && !tempDirectory.isEmpty()) {
  ctx.setTempDirectory(new File(tempDirectory));
  ctx.setAttribute("javax.servlet.context.tempdir", tempDirectory);
 }
 ctx.getServletContext().setAttribute(CONF_CONTEXT_ATTRIBUTE, b.conf);
 ctx.getServletContext().setAttribute(ADMINS_ACL, adminsAcl);
 addNoCacheFilter(ctx);
 return ctx;
}

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

private static WebAppContext createWebAppContext(String name,
  Configuration conf, AccessControlList adminsAcl, final String appDir) {
 WebAppContext ctx = new WebAppContext();
 ctx.setDisplayName(name);
 ctx.setContextPath("/");
 ctx.setWar(appDir + "/" + name);
 ctx.getServletContext().setAttribute(CONF_CONTEXT_ATTRIBUTE, conf);
 // for org.apache.hadoop.metrics.MetricsServlet
 ctx.getServletContext().setAttribute(
  org.apache.hadoop.http.HttpServer2.CONF_CONTEXT_ATTRIBUTE, conf);
 ctx.getServletContext().setAttribute(ADMINS_ACL, adminsAcl);
 addNoCacheFilter(ctx);
 return ctx;
}

代码示例来源:origin: org.springframework.boot/spring-boot

context.setDisplayName(getDisplayName());
configureDocumentRoot(context);
if (isRegisterDefaultServlet()) {

代码示例来源:origin: org.apache.hive/hive-common

/**
 * Create the web context for the application of specified name
 */
WebAppContext createWebAppContext(Builder b) {
 WebAppContext ctx = new WebAppContext();
 setContextAttributes(ctx.getServletContext(), b.contextAttrs);
 ctx.setDisplayName(b.name);
 ctx.setContextPath("/");
 ctx.setWar(appDir + "/" + b.name);
 return ctx;
}

代码示例来源:origin: apache/nifi-minifi

private static WebAppContext loadWar(final File warFile, final String contextPath, final ClassLoader parentClassLoader) throws IOException {
  final WebAppContext webappContext = new WebAppContext(warFile.getPath(), contextPath);
  webappContext.setContextPath(contextPath);
  webappContext.setDisplayName(contextPath);

代码示例来源:origin: jenkinsci/winstone

public void visitDisplayName(WebAppContext context, Descriptor descriptor, XmlParser.Node node)
{
  //Servlet Spec 3.0 p. 74 Ignore from web-fragments
  if (!(descriptor instanceof FragmentDescriptor))
  {
    context.setDisplayName(node.toString(false, true));
    context.getMetaData().setOrigin("display-name", descriptor);
  }
}

代码示例来源:origin: org.apache.nifi.minifi/minifi-c2-jetty

private static WebAppContext loadWar(final File warFile, final String contextPath, final ClassLoader parentClassLoader) throws IOException {
  final WebAppContext webappContext = new WebAppContext(warFile.getPath(), contextPath);
  webappContext.setContextPath(contextPath);
  webappContext.setDisplayName(contextPath);

代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9

/**
 * @param context
 * @param descriptor
 * @param node
 */
protected void visitDisplayName(WebAppContext context, Descriptor descriptor, XmlParser.Node node)
{
  //Servlet Spec 3.0 p. 74 Ignore from web-fragments
  if (!(descriptor instanceof FragmentDescriptor))
  {
    context.setDisplayName(node.toString(false, true));
    context.getMetaData().setOrigin("display-name", descriptor);
  }
}

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server

/**
 * @param context
 * @param descriptor
 * @param node
 */
protected void visitDisplayName(WebAppContext context, Descriptor descriptor, XmlParser.Node node)
{
  //Servlet Spec 3.0 p. 74 Ignore from web-fragments
  if (!(descriptor instanceof FragmentDescriptor))
  {
    context.setDisplayName(node.toString(false, true));
    context.getMetaData().setOrigin("display-name", descriptor);
  }
}

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-webapp

/**
 * @param context
 * @param descriptor
 * @param node
 */
protected void visitDisplayName(WebAppContext context, Descriptor descriptor, XmlParser.Node node)
{
  //Servlet Spec 3.0 p. 74 Ignore from web-fragments
  if (!(descriptor instanceof FragmentDescriptor))
  {
    context.setDisplayName(node.toString(false, true));
    context.getMetaData().setOrigin("display-name", descriptor);
  }
}

代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9

/**
 * @param context
 * @param descriptor
 * @param node
 */
protected void visitDisplayName(WebAppContext context, Descriptor descriptor, XmlParser.Node node)
{
  //Servlet Spec 3.0 p. 74 Ignore from web-fragments
  if (!(descriptor instanceof FragmentDescriptor))
  {
    context.setDisplayName(node.toString(false, true));
    context.getMetaData().setOrigin("display-name", descriptor);
  }
}

代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-plus

/**
 * @param context
 * @param descriptor
 * @param node
 */
protected void visitDisplayName(WebAppContext context, Descriptor descriptor, XmlParser.Node node)
{
  //Servlet Spec 3.0 p. 74 Ignore from web-fragments
  if (!(descriptor instanceof FragmentDescriptor))
  {
    context.setDisplayName(node.toString(false, true));
    context.getMetaData().setOrigin("display-name", descriptor);
  }
}

代码示例来源:origin: enioka/jqm

webAppContext.setDisplayName("JqmWebServices");

代码示例来源:origin: org.apache.hbase/hbase-http

private static WebAppContext createWebAppContext(String name,
  Configuration conf, AccessControlList adminsAcl, final String appDir) {
 WebAppContext ctx = new WebAppContext();
 ctx.setDisplayName(name);
 ctx.setContextPath("/");
 ctx.setWar(appDir + "/" + name);
 ctx.getServletContext().setAttribute(CONF_CONTEXT_ATTRIBUTE, conf);
 // for org.apache.hadoop.metrics.MetricsServlet
 ctx.getServletContext().setAttribute(
  org.apache.hadoop.http.HttpServer2.CONF_CONTEXT_ATTRIBUTE, conf);
 ctx.getServletContext().setAttribute(ADMINS_ACL, adminsAcl);
 addNoCacheFilter(ctx);
 return ctx;
}

代码示例来源:origin: com.aliyun.hbase/alihbase-http

private static WebAppContext createWebAppContext(String name,
  Configuration conf, AccessControlList adminsAcl, final String appDir) {
 WebAppContext ctx = new WebAppContext();
 ctx.setDisplayName(name);
 ctx.setContextPath("/");
 ctx.setWar(appDir + "/" + name);
 ctx.getServletContext().setAttribute(CONF_CONTEXT_ATTRIBUTE, conf);
 // for org.apache.hadoop.metrics.MetricsServlet
 ctx.getServletContext().setAttribute(
  org.apache.hadoop.http.HttpServer2.CONF_CONTEXT_ATTRIBUTE, conf);
 ctx.getServletContext().setAttribute(ADMINS_ACL, adminsAcl);
 addNoCacheFilter(ctx);
 return ctx;
}

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

webapp.setDisplayName(Fuseki.servletRequestLogName);  
webapp.setParentLoaderPriority(true);  // Normal Java classloader behaviour.
webapp.setErrorHandler(new FusekiErrorHandler()) ;

相关文章

微信公众号

最新文章

更多

WebAppContext类方法