User: starksm 
  Date: 02/02/15 20:48:41

  Modified:    src/main/org/jboss/metadata WebMetaData.java
  Log:
  Add a contextRoot element to the war level to support specification
  of the context root for stand-alone war deployments.
  
  Revision  Changes    Path
  1.7       +19 -3     jboss/src/main/org/jboss/metadata/WebMetaData.java
  
  Index: WebMetaData.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/metadata/WebMetaData.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- WebMetaData.java  3 Dec 2001 04:28:13 -0000       1.6
  +++ WebMetaData.java  16 Feb 2002 04:48:41 -0000      1.7
  @@ -22,7 +22,7 @@
    * @see org.jboss.web.AbstractWebContainer
    
    * @author [EMAIL PROTECTED]
  - * @version $Revision: 1.6 $
  + * @version $Revision: 1.7 $
    */
   public class WebMetaData implements XmlLoadable
   {
  @@ -32,8 +32,11 @@
      private HashMap ejbReferences = new HashMap();
      private HashMap ejbLocalReferences = new HashMap();
      private ArrayList securityRoleReferences = new ArrayList();
  +   /** The war context root as specified as the jboss-web.xml
  +    descriptor level. */
  +   private String contextRoot;
      private String securityDomain;
  -   
  +
      public WebMetaData()
      {
      }
  @@ -75,6 +78,14 @@
         return resourceEnvReferences.values().iterator();
      }
   
  +   /** This the the jboss-web.xml descriptor context-root and it
  +    *is only meaningful if a war is deployed outside of an ear.
  +    */
  +   public String getContextRoot()
  +   {
  +      return contextRoot;
  +   }
  +
      /** Return the optional security-domain jboss-web.xml element.
       @return The jndiName of the security manager implementation that is
       responsible for security of the web application. May be null if
  @@ -158,7 +169,12 @@
       */
      protected void importJBossWebXml(Element jbossWeb) throws Exception
      {
  -      // Parse the jboss-web/securityDomain element
  +      // Parse the jboss-web/root-context element
  +      Element contextRootElement = MetaData.getOptionalChild(jbossWeb, 
"context-root");
  +      if( contextRootElement != null )
  +         contextRoot = MetaData.getElementContent(contextRootElement);
  +
  +      // Parse the jboss-web/security-domain element
         Element securityDomainElement = MetaData.getOptionalChild(jbossWeb, 
"security-domain");
         if( securityDomainElement != null )
            securityDomain = MetaData.getElementContent(securityDomainElement);
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to