larryi      02/02/23 19:46:06

  Modified:    src/share/org/apache/tomcat/modules/config AutoWebApp.java
  Log:
  Make the "special" characters configurable. These are  used in deriving
  the virtual host and path name from the directory name.  Fix bug where
  virtual host character was incorrectly included in the context's path name.
  
  Revision  Changes    Path
  1.12      +25 -1     
jakarta-tomcat/src/share/org/apache/tomcat/modules/config/AutoWebApp.java
  
  Index: AutoWebApp.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/config/AutoWebApp.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- AutoWebApp.java   5 Feb 2002 01:30:29 -0000       1.11
  +++ AutoWebApp.java   24 Feb 2002 03:46:06 -0000      1.12
  @@ -164,6 +164,30 @@
       public void setReloadable( boolean b ) {
           reloadable=b;
       }
  +
  +    public void setHostChar( String c ) {
  +        if ( c.length() > 0 ) {
  +            hostSeparator = c.charAt(0);
  +        } else {
  +            hostSeparator = '\0';
  +        }
  +    }
  +
  +    public void setHostDotChar( String c ) {
  +        if ( c.length() > 0 ) {
  +            dotReplacement = c.charAt(0);
  +        } else {
  +            dotReplacement = '\0';
  +        }
  +    }
  +
  +    public void setPathSlashChar( String c ) {
  +        if ( c.length() > 0 ) {
  +            slashReplacement = c.charAt(0);
  +        } else {
  +            slashReplacement = '\0';
  +        }
  +    }
       
       //-------------------- Implementation --------------------
       
  @@ -212,7 +236,7 @@
                        int idx=name.indexOf( hostSeparator ); // may change
                        if( idx > 0 ) {
                            appHost=name.substring( 0, idx );
  -                         name=name.substring( idx );
  +                         name=name.substring( idx + 1 );
                        }
                    }
                    if( appHost == null )
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to