本文整理了Java中org.eclipse.jetty.webapp.WebAppContext.isConfigurationDiscovered()
方法的一些代码示例,展示了WebAppContext.isConfigurationDiscovered()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebAppContext.isConfigurationDiscovered()
方法的具体详情如下:
包路径:org.eclipse.jetty.webapp.WebAppContext
类名称:WebAppContext
方法名:isConfigurationDiscovered
[英]Is the context Automatically configured.
[中]是自动配置的上下文。
代码示例来源: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: com.ovea.tajin.servers/tajin-server-jetty9
@Override
public void configure(WebAppContext context) throws Exception
{
if (!context.isConfigurationDiscovered())
return;
//order the fragments
context.getMetaData().orderFragments();
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-plus
@Override
public void configure(WebAppContext context) throws Exception
{
if (!context.isConfigurationDiscovered())
return;
//order the fragments
context.getMetaData().orderFragments();
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server
@Override
public void configure(WebAppContext context) throws Exception
{
if (!context.isConfigurationDiscovered())
return;
//order the fragments
context.getMetaData().orderFragments();
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
@Override
public void preConfigure(WebAppContext context) throws Exception
{
if (!context.isConfigurationDiscovered())
return;
//find all web-fragment.xmls
findWebFragments(context, context.getMetaData());
}
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
@Override
public void preConfigure(WebAppContext context) throws Exception
{
if (!context.isConfigurationDiscovered())
return;
//find all web-fragment.xmls
findWebFragments(context, context.getMetaData());
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server
@Override
public void preConfigure(WebAppContext context) throws Exception
{
if (!context.isConfigurationDiscovered())
return;
//find all web-fragment.xmls
findWebFragments(context, context.getMetaData());
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-plus
@Override
public void preConfigure(WebAppContext context) throws Exception
{
if (!context.isConfigurationDiscovered())
return;
//find all web-fragment.xmls
findWebFragments(context, context.getMetaData());
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-webapp
@Override
public void preConfigure(WebAppContext context) throws Exception
{
if (!context.isConfigurationDiscovered())
return;
//find all web-fragment.xmls
findWebFragments(context, context.getMetaData());
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-webapp
@Override
public void configure(WebAppContext context) throws Exception
{
if (!context.isConfigurationDiscovered())
return;
//order the fragments
context.getMetaData().orderFragments();
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
@Override
public void configure(WebAppContext context) throws Exception
{
if (!context.isConfigurationDiscovered())
return;
//order the fragments
context.getMetaData().orderFragments();
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-webapp
if (name.equals("META-INF/web-fragment.xml") && context.isConfigurationDiscovered())
else if (name.equals("META-INF/resources/") && context.isConfigurationDiscovered())
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-plus
if (name.equals("META-INF/web-fragment.xml") && context.isConfigurationDiscovered())
else if (name.equals("META-INF/resources/") && context.isConfigurationDiscovered())
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server
if (name.equals("META-INF/web-fragment.xml") && context.isConfigurationDiscovered())
else if (name.equals("META-INF/resources/") && context.isConfigurationDiscovered())
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
if (name.equals("META-INF/web-fragment.xml") && context.isConfigurationDiscovered())
else if (name.equals("META-INF/resources/") && context.isConfigurationDiscovered())
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
if (name.equals("META-INF/web-fragment.xml") && context.isConfigurationDiscovered())
else if (name.equals("META-INF/resources/") && context.isConfigurationDiscovered())
代码示例来源:origin: org.eclipse.jetty/jetty-annotations
if (context.getServletContext().getEffectiveMajorVersion() >= 3 || context.isConfigurationDiscovered())
代码示例来源:origin: eclipse-jetty/eclipse-jetty-plugin
if ((context.getServletContext().getEffectiveMajorVersion() >= 3) || context.isConfigurationDiscovered())
代码示例来源: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: com.ovea.tajin.server/tajin-server-jetty9
if (context.getServletContext().getEffectiveMajorVersion() >= 3 || context.isConfigurationDiscovered())
if (LOG.isDebugEnabled()) LOG.debug("Scanning all classses for annotations: webxmlVersion="+context.getServletContext().getEffectiveMajorVersion()+" configurationDiscovered="+context.isConfigurationDiscovered());
parseContainerPath(context, parser);
内容来源于网络,如有侵权,请联系作者删除!