List<WebFragmentDescriptor> wfList = readStandardFragments(descriptor, archive); if (isProcessAnnotation(descriptor)) { Map<ExtensionsArchivist, RootDeploymentDescriptor> localExtensions = new HashMap<ExtensionsArchivist, RootDeploymentDescriptor>(); ModuleScanner scanner = getScanner(); if (scanner instanceof WarScanner) { ((WarScanner)scanner).setScanOtherLibraries(true); readAnnotations(archive, descriptor, localExtensions, scanner); WebBundleDescriptor defaultWebBundleDescriptor = getPlainDefaultWebXmlBundleDescriptor(); if (defaultWebBundleDescriptor != null) { descriptor.addDefaultWebBundleDescriptor(defaultWebBundleDescriptor);
Vector libs = getLibraries(archive); if (libs != null && libs.size() > 0) { Archivist wfArchivist = new WebFragmentArchivist(); wfArchivist.initializeContext(this); wfArchivist.setRuntimeXMLValidation(this.getRuntimeXMLValidation()); wfArchivist.setRuntimeXMLValidationLevel( this.getRuntimeXMLValidationLevel()); wfArchivist.setAnnotationProcessingRequested(false);
if (contextRoot!=null && location != null) { File docroot = new File(location); WebBundleDescriptor wbd = webArchivist.getDefaultWebXmlBundleDescriptor(); wmInfo = new WebModuleConfig(); wbd.setName(Constants.DEFAULT_WEB_MODULE_NAME);
/** * @return a validated WebBundleDescriptor corresponding to default-web.xml * that can be used in webtier. */ public synchronized WebBundleDescriptor getDefaultWebXmlBundleDescriptor() { if (defaultWebXmlBundleDescriptor == null) { defaultWebXmlBundleDescriptor = getPlainDefaultWebXmlBundleDescriptor(); ApplicationValidator validator = new ApplicationValidator(); validator.accept(defaultWebXmlBundleDescriptor ); } return defaultWebXmlBundleDescriptor ; }
/** * @return a non-validated WebBundleDescriptor corresponding to default-web.xml */ private WebBundleDescriptor getPlainDefaultWebXmlBundleDescriptor() { WebBundleDescriptor defaultWebBundleDesc = new WebBundleDescriptor(); InputStream fis = null; try { // parse default-web.xml contents URL defaultWebXml = getDefaultWebXML(); if (defaultWebXml!=null) { fis = defaultWebXml.openStream(); WebDeploymentDescriptorFile wddf = new WebDeploymentDescriptorFile(); wddf.setXMLValidation(false); defaultWebBundleDesc.addWebBundleDescriptor(wddf.read(fis)); } } catch (Exception e) { LogDomains.getLogger(WebArchivist.class, LogDomains.WEB_LOGGER). warning("Error in parsing default-web.xml"); } finally { try { if (fis != null) { fis.close(); } } catch (IOException ioe) { // do nothing } } return defaultWebBundleDesc; }
webArchivist.getDefaultWebXmlBundleDescriptor(); wmInfo = new WebModuleConfig(); wbd.setModuleID(Constants.DEFAULT_WEB_MODULE_NAME);