Class WebXml

    • Constructor Detail

      • WebXml

        public WebXml()
        Constructor.
      • WebXml

        public WebXml​(org.jdom2.Element rootElement,
                      DescriptorType type)
        Constructor.
        Parameters:
        rootElement - The root webxml element
        type - The descriptor type to use
    • Method Detail

      • getFileName

        public String getFileName()
        Returns the file name of this descriptor. For example "web.xml", "weblogic.xml", etc.
        Specified by:
        getFileName in interface Descriptor
        Returns:
        the file name
      • addVendorDescriptor

        public void addVendorDescriptor​(VendorWebAppDescriptor descr)
        Associates a vendor specific descriptor with this web.xml.
        Parameters:
        descr - the vendor specific dexcriptor to associate
      • getVendorDescriptors

        public List<Descriptor> getVendorDescriptors()
        Returns all vendor descriptors associated with this J2EE deployment descriptor. For example for JBoss the vendor descriptor associated with web.xml is jboss-web.xml.
        Specified by:
        getVendorDescriptors in interface J2eeDescriptor
        Returns:
        List of Descriptor objects
      • getTagNamespace

        protected org.jdom2.Namespace getTagNamespace()
        Get the namespace that tags in this descriptor live in.
        Returns:
        the namespace, or null if none
      • getVersion

        public WebXmlVersion getVersion()
        Returns the servlet API version.
        Returns:
        The version
      • addTag

        public void addTag​(DescriptorElement element)
        Add a tag into the document.
        Parameters:
        element - The element to add
      • getTag

        public org.jdom2.Element getTag​(String tag)
        Get a tag by name.
        Parameters:
        tag - The tag name
        Returns:
        the element for the tag