Search in sources :

Example 26 with WebXml

use of org.apache.catalina.deploy.WebXml in project tomcat70 by apache.

the class ContextConfig method processAnnotations.

protected void processAnnotations(Set<WebXml> fragments, boolean handlesTypesOnly) {
    for (WebXml fragment : fragments) {
        WebXml annotations = new WebXml();
        // no impact on distributable
        annotations.setDistributable(true);
        URL url = fragment.getURL();
        processAnnotationsUrl(url, annotations, (handlesTypesOnly || fragment.isMetadataComplete()));
        Set<WebXml> set = new HashSet<WebXml>();
        set.add(annotations);
        // Merge annotations into fragment - fragment takes priority
        fragment.merge(set);
    }
}
Also used : WebXml(org.apache.catalina.deploy.WebXml) URL(java.net.URL) HashSet(java.util.HashSet) LinkedHashSet(java.util.LinkedHashSet)

Aggregations

WebXml (org.apache.catalina.deploy.WebXml)26 Test (org.junit.Test)20 File (java.io.File)17 ServletDef (org.apache.catalina.deploy.ServletDef)5 WebRuleSet (org.apache.catalina.startup.WebRuleSet)5 XmlErrorHandler (org.apache.tomcat.util.descriptor.XmlErrorHandler)5 Digester (org.apache.tomcat.util.digester.Digester)5 URL (java.net.URL)4 FilterDef (org.apache.catalina.deploy.FilterDef)3 IOException (java.io.IOException)2 HashSet (java.util.HashSet)2 LinkedHashSet (java.util.LinkedHashSet)2 NamingException (javax.naming.NamingException)2 ServletContainerInitializer (javax.servlet.ServletContainerInitializer)2 StandardContext (org.apache.catalina.core.StandardContext)2 FilterMap (org.apache.catalina.deploy.FilterMap)2 FileDirContext (org.apache.naming.resources.FileDirContext)2 InputSource (org.xml.sax.InputSource)2 JarURLConnection (java.net.JarURLConnection)1 MalformedURLException (java.net.MalformedURLException)1