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
      • informJBossWebContext

        public void informJBossWebContext​(Logger logger)
        When a WAR file has a context root set in its WEB-INF/jboss-web.xml file, then this overrides any other context set in the Codehaus Cargo deployable. Inform the user about it when necessary.

        This information message is output only once per JBossWAR file name.
        Parameters:
        logger - logger to user for informing.