Class JBossWAR

  • All Implemented Interfaces:
    Deployable, Loggable

    public class JBossWAR
    extends WAR
    Extension that supports custom JBoss descriptor files such as the jboss-web.xml one. For example, this allows returning the right web context even if it has been defined in the jboss-web.xml file.
    • Constructor Detail

      • JBossWAR

        public JBossWAR​(String war)
        Parameters:
        war - the location of the WAR being wrapped. This must point to either a WAR file or an expanded WAR directory.
    • Method Detail

      • getContext

        public String getContext()
        Overrides:
        getContext in class WAR
        Returns:
        the context defined in jboss-web.xml if any (including, if present, the virtual host name as a prefix). If there is no jboss-web.xml or if it doesn't define any root context, then return WAR.getContext().
      • getVirtualHost

        public String getVirtualHost()
        Returns:
        the virtual host element found in the jboss-web.xml file or null if not defined
      • containsJBossWebFile

        public boolean containsJBossWebFile()
        Returns:
        true if the WAR contains a WEB-INF/jboss-web.xml file
      • containsJBossWebContext

        public boolean containsJBossWebContext()
        Returns:
        true if the WAR contains a WEB-INF/jboss-web.xml file with a context