You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by co...@apache.org on 2001/08/12 04:09:42 UTC

cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/modules/config AutoWebApp.java

costin      01/08/11 19:09:42

  Modified:    src/share/org/apache/tomcat/modules/config AutoWebApp.java
  Log:
  Added a prefix, in addition of the existing host ( a bit more flexibility )
  
  Revision  Changes    Path
  1.8       +8 -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.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- AutoWebApp.java	2001/07/27 03:57:31	1.7
  +++ AutoWebApp.java	2001/08/12 02:09:42	1.8
  @@ -88,6 +88,7 @@
       boolean ignoreDot=true;
       String profile=null;
       boolean trusted=false;
  +    String prefix="";
       
       // encoding scheme - XXX review, customize, implement
       char hostSeparator='@'; // if support for vhost configuration is enabled
  @@ -109,6 +110,12 @@
   	appsD=d;
       }
   
  +    /** Add a prefix to all deployed context paths
  +     */
  +    public void setPrefix(String s ) {
  +	prefix=s;
  +    }
  +    
       /** All applications in the directory will be added to a
   	single virtual host. If not set, an encoding scheme
   	will be used to extract the virtual host name from
  @@ -251,7 +258,7 @@
   	if (dir.isDirectory()) {
   	    Context ctx=new Context();
   	    ctx.setContextManager( cm );
  -	    ctx.setPath(path);
  +	    ctx.setPath(prefix + path);
   	    if( ! "DEFAULT".equals( host ) )
   		ctx.setHost( host );
   	    try {