Examples of WebBundleDescriptor


Examples of com.sun.enterprise.deployment.WebBundleDescriptor

            // loads the deployment descriptors
      Application app = loadDescriptors();
            // Set the generated XML directory in application desc
            request.getDescriptor().setGeneratedXMLDirectory(xmlDir.getAbsolutePath());
     
            WebBundleDescriptor bundleDesc = (WebBundleDescriptor) app.getStandaloneBundleDescriptor();

            // The priority order of how the context root should be used:
            // 1. Context root specified by user (via --contextRoot option
            // or via gui), i.e. request.getContextRoot()
            // 2. Context root specified in sun-web.xml i.e.
            // bundleDesc.getContextRoot()
            // 3. The default context root (archive name etc) i.e.
            // req.getDefaultContextRoot()

            if (request.getContextRoot() == null ||
                request.getContextRoot().trim().equals("")) {
                if (bundleDesc.getContextRoot() != null &&
                    !bundleDesc.getContextRoot().trim().equals("")) {
                    request.setContextRoot(bundleDesc.getContextRoot());
                } else {
                    request.setContextRoot(request.getDefaultContextRoot());
                }
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.