Changeset 25951

Show
Ignore:
Timestamp:
16.07.2012 17:47:34 (7 years ago)
Author:
ak19
Message:

gsdl3.home no longer exists as a property in global.properties. This had broken gs3-server.sh, but now it defaults to the usual GSDL3SRCHOME/web folder if there is no gsdl3.home property.

Location:
main/trunk/greenstone3/src/java/org/greenstone
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/server/Server3.java

    r25717 r25951  
    1414    public Server3(String gsdl3_src_home, String lang) 
    1515    { 
    16         super(gsdl3_src_home, lang, gsdl3_src_home + File.separatorChar + "build.properties", "logs"); 
     16        super(gsdl3_src_home, lang, gsdl3_src_home + File.separatorChar + "build.properties", "web"+File.separator+"logs"); 
    1717 
    1818        Property = new Server3Property(); 
     
    4545    public void reload() 
    4646    { 
    47         GlobalProperties.loadGlobalProperties(null); // properties file may have changed, so reload it 
     47        String fallback_gsdl3_home = System.getenv("GSDL3SRCHOME") + File.separator + "web"; 
     48        GlobalProperties.loadGlobalProperties(fallback_gsdl3_home); // properties file may have changed, so reload it 
    4849    } 
    4950 
  • main/trunk/greenstone3/src/java/org/greenstone/server/Server3Settings.java

    r25635 r25951  
    3939    servlet_combobox.setBackground(bg_color); 
    4040 
    41     File web_xml = new File(GlobalProperties.getProperty(BaseServer.Property.GSDL_HOME) + File.separator + "WEB-INF" + File.separator + "web.xml"); 
     41    File web_xml = new File(GlobalProperties.getGSDL3Home() + File.separator + "WEB-INF" + File.separator + "web.xml"); 
    4242    XMLConverter converter = new XMLConverter(); 
    4343    Document web_config = converter.getDOM(web_xml); 
  • main/trunk/greenstone3/src/java/org/greenstone/util/GlobalProperties.java

    r25938 r25951  
    9595            } 
    9696 
     97            // if gsdl3_home is still null, fall back to default: gsdl3srchome/web 
     98            if (gsdl3_home == null) {  
     99                gsdl3_home = System.getenv("GSDL3SRCHOME") + File.separator + "web"; 
     100                logger.warn("** Note: falling back to using GSDL3SRCHOME to set gsdl3.home to: " + gsdl3_home); 
     101            } 
     102 
    97103            // make sure the path separators are correct 
    98104            // gsdl3_home may be null, eg when we are loading properties from Server3