User: d_jencks
  Date: 02/02/24 11:28:19

  Modified:    src/main/org/jboss/web AbstractWebContainer.java
  Log:
  fixed web context - can again identify our web context
  
  Revision  Changes    Path
  1.36      +8 -9      jboss/src/main/org/jboss/web/AbstractWebContainer.java
  
  Index: AbstractWebContainer.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/web/AbstractWebContainer.java,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- AbstractWebContainer.java 24 Feb 2002 10:24:32 -0000      1.35
  +++ AbstractWebContainer.java 24 Feb 2002 19:28:19 -0000      1.36
  @@ -148,7 +148,7 @@
   @see org.jboss.security.SecurityAssociation;
   
   @author  [EMAIL PROTECTED]
  -@version $Revision: 1.35 $
  +@version $Revision: 1.36 $
   */
   public abstract class AbstractWebContainer 
      extends ServiceMBeanSupport 
  @@ -206,22 +206,21 @@
            if (di.parent != null && di.parent.metaData instanceof 
J2eeApplicationMetaData) 
            {
               J2eeApplicationMetaData app = (J2eeApplicationMetaData) 
di.parent.metaData;
  -            
  +            log.debug("found parent metadata: " + di.parent.url);
               J2eeModuleMetaData mod;
  -            Iterator it = app.getModules();
  -            while (it.hasNext())
  +            for (Iterator it = app.getModules(); it.hasNext(); )
               {
                  // iterate the war modules
                  mod = (J2eeModuleMetaData) it.next();
                  if( mod.isWeb() )
                  {
  -                  /* Only pick up the context for our war, the di.shortName is
  -                   <int>.myweb.war so we add a '.' to the module file name and
  -                   then test shortName ends with the matching name.
  +                  /* Careful, if the place/file the war gets copied to changes, 
  +                     this will need changing too maybe.
                      */
  -                  String matchName = '.' + mod.getFileName();
  -                  if( di.shortName.endsWith(matchName) == true )
  +                  if (di.shortName.equals(mod.getFileName()))
  +                  {
                        di.webContext = mod.getWebContext();
  +                  }
                  }
               }
            }
  
  
  

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

Reply via email to