User: starksm 
  Date: 02/04/11 14:44:43

  Modified:    src/main/org/jboss/web AbstractWebContainer.java
  Log:
  Restore the removal of the <int> prefix on the war file name when
  building the context path from the war name.
  
  Revision  Changes    Path
  1.41      +15 -3     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.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- AbstractWebContainer.java 11 Apr 2002 08:54:47 -0000      1.40
  +++ AbstractWebContainer.java 11 Apr 2002 21:44:42 -0000      1.41
  @@ -158,7 +158,7 @@
   @see org.jboss.security.SecurityAssociation;
   
   @author  [EMAIL PROTECTED]
  -@version $Revision: 1.40 $
  +@version $Revision: 1.41 $
   */
   public abstract class AbstractWebContainer 
      extends SubDeployerSupport
  @@ -196,7 +196,7 @@
      public AbstractWebContainer()
      {
      }
  -   
  +
      public boolean accepts(DeploymentInfo sdi) 
      {
         String warFile = sdi.url.getFile();
  @@ -851,7 +851,7 @@
      /** Use reflection to access a URL[] getURLs method so that non-URLClassLoader
       *class loaders that support this method can provide info.
       */
  -   private URL[] getClassLoaderURLs(ClassLoader cl)
  +   protected URL[] getClassLoaderURLs(ClassLoader cl)
      {
         URL[] urls = {};
         try
  @@ -973,11 +973,23 @@
            int suffix = webContext.indexOf(".war");
            if( suffix > 0 )
               webContext = webContext.substring(0, suffix);
  +          // Strip any '<int-value>.' prefix   
  +          int index = 0;   
  +          for(; index < webContext.length(); index ++)   
  +          {   
  +             char c = webContext.charAt(index);   
  +             if( Character.isDigit(c) == false && c != '.' )   
  +                break;   
  +          }   
  +          webContext = webContext.substring(index);   
         }
   
         // Servlet containers are anal about the web context starting with '/'
         if( webContext.length() > 0 && webContext.charAt(0) != '/' )
            webContext = "/" + webContext;
  +      // And also the default root context must be an empty string, not '/'
  +      else if( webContext.equals("/") )
  +         webContext = "";
         metaData.setContextRoot(webContext);
   
         return metaData;
  
  
  

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

Reply via email to