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

x33g5p2x  于2022-01-25 转载在 其他  
字(5.2k)|赞(0)|评价(0)|浏览(85)

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

MetaData.getWebInfJars介绍

暂无

代码示例

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

@Override
public void preConfigure(final WebAppContext context) throws Exception
{
  boolean useContainerCache = DEFAULT_USE_CONTAINER_METAINF_CACHE;
  if (context.getServer() != null)
  {
    Boolean attr = (Boolean)context.getServer().getAttribute(USE_CONTAINER_METAINF_CACHE);
    if (attr != null)
      useContainerCache = attr.booleanValue();
  }
  
  if (LOG.isDebugEnabled()) LOG.debug("{} = {}", USE_CONTAINER_METAINF_CACHE, useContainerCache);
  
  //pre-emptively create empty lists for tlds, fragments and resources as context attributes
  //this signals that this class has been called. This differentiates the case where this class
  //has been called but finds no META-INF data from the case where this class was never called
  if (context.getAttribute(METAINF_TLDS) == null)
    context.setAttribute(METAINF_TLDS, new HashSet<URL>());
  if (context.getAttribute(METAINF_RESOURCES) == null)
    context.setAttribute(METAINF_RESOURCES, new HashSet<Resource>());
  if (context.getAttribute(METAINF_FRAGMENTS) == null)
    context.setAttribute(METAINF_FRAGMENTS, new HashMap<Resource, Resource>());
  //always scan everything from the container's classpath
  scanJars(context, context.getMetaData().getContainerResources(), useContainerCache, __allScanTypes);
  //only look for fragments if web.xml is not metadata complete, or it version 3.0 or greater
  List<String> scanTypes = new ArrayList<>(__allScanTypes);
  if (context.getMetaData().isMetaDataComplete() || (context.getServletContext().getEffectiveMajorVersion() < 3) && !context.isConfigurationDiscovered())
    scanTypes.remove(METAINF_FRAGMENTS);
  scanJars(context, context.getMetaData().getWebInfJars(), false, scanTypes);
}

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

resources = orderedWebInfJars;
else
  resources = getWebInfJars();

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

jars.addAll(context.getMetaData().getWebInfJars());

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

jars.addAll(context.getMetaData().getWebInfJars());

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

jars.addAll(context.getMetaData().getWebInfJars());

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

jars.addAll(context.getMetaData().getWebInfJars());

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

jars.addAll(context.getMetaData().getWebInfJars());

代码示例来源:origin: io.leopard/leopard-jetty

protected void addFolderResource(final WebAppContext context) throws IOException {
  for (Resource resource : context.getMetaData().getWebInfJars()) {
    String url = resource.toString();
    if (!isClassesDir(url)) {
      continue;
    }
    {
      Resource fragmentResource = resource.getResource("META-INF/web-fragment.xml");
      if (fragmentResource.exists()) {
        // addResource(context, METAINF_FRAGMENTS, resource);
      }
    }
    this.addTldResource(context, resource, "META-INF/fnx.tld");
    this.addTldResource(context, resource, "META-INF/dw.tld");
  }
}

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

if (!context.getMetaData().getWebInfJars().contains(bundleRes))

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

else
  jars = context.getMetaData().getWebInfJars();

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

@Override
public void preConfigure(final WebAppContext context) throws Exception
{
  boolean useContainerCache = DEFAULT_USE_CONTAINER_METAINF_CACHE;
  if (context.getServer() != null)
  {
    Boolean attr = (Boolean)context.getServer().getAttribute(USE_CONTAINER_METAINF_CACHE);
    if (attr != null)
      useContainerCache = attr.booleanValue();
  }
  
  if (LOG.isDebugEnabled()) LOG.debug("{} = {}", USE_CONTAINER_METAINF_CACHE, useContainerCache);
  
  //pre-emptively create empty lists for tlds, fragments and resources as context attributes
  //this signals that this class has been called. This differentiates the case where this class
  //has been called but finds no META-INF data from the case where this class was never called
  if (context.getAttribute(METAINF_TLDS) == null)
    context.setAttribute(METAINF_TLDS, new HashSet<URL>());
  if (context.getAttribute(METAINF_RESOURCES) == null)
    context.setAttribute(METAINF_RESOURCES, new HashSet<Resource>());
  if (context.getAttribute(METAINF_FRAGMENTS) == null)
    context.setAttribute(METAINF_FRAGMENTS, new HashMap<Resource, Resource>());
  //always scan everything from the container's classpath
  scanJars(context, context.getMetaData().getContainerResources(), useContainerCache, __allScanTypes);
  //only look for fragments if web.xml is not metadata complete, or it version 3.0 or greater
  List<String> scanTypes = new ArrayList<>(__allScanTypes);
  if (context.getMetaData().isMetaDataComplete() || (context.getServletContext().getEffectiveMajorVersion() < 3) && !context.isConfigurationDiscovered())
    scanTypes.remove(METAINF_FRAGMENTS);
  scanJars(context, context.getMetaData().getWebInfJars(), false, scanTypes);
}

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

resources = orderedWebInfJars;
else
  resources = getWebInfJars();

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

jars = context.getMetaData().getWebInfJars();

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

jars = context.getMetaData().getWebInfJars();

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

jars = context.getMetaData().getWebInfJars();

相关文章

微信公众号

最新文章

更多