Changeset 26195 for main

Show
Ignore:
Timestamp:
13.09.2012 14:09:03 (8 years ago)
Author:
kjdon
Message:

if the greenstone context (/greenstone3 normally) is empty, and therefore gsdl3webaddress is empty, then start site_http_address with sites, not /sites

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/core/MessageRouter.java

    r25748 r26195  
    168168        } 
    169169        this.site_home = GSFile.siteHome(GlobalProperties.getGSDL3Home(), this.site_name); 
    170         this.site_http_address = GlobalProperties.getGSDL3WebAddress() + "/sites/" + this.site_name; 
    171  
     170        String web_address = GlobalProperties.getGSDL3WebAddress(); 
     171        if (web_address.equals("")) { 
     172            this.site_http_address = "sites/"+this.site_name; 
     173        } else {  
     174            this.site_http_address = web_address + "/sites/" + this.site_name; 
     175        } 
    172176        // are we behind a firewall?? - is there a better place to set up the proxy? 
    173177        String host = GlobalProperties.getProperty("proxy.host");