Ignore:
Timestamp:
2018-08-22T22:08:05+12:00 (6 years ago)
Author:
ak19
Message:

GS3 Java code has moved away from using tomcat.port to using tomcat.port.<protocol>.

File:
1 edited

Legend:

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

    r32329 r32357  
    1111import org.greenstone.server.BaseProperty;
    1212import org.greenstone.util.GlobalProperties;
     13import org.greenstone.util.ProtocolPortProperties;
    1314import org.greenstone.util.RunAnt;
    1415
     
    1617{
    1718        String opt_ant_properties = null;
     19        ProtocolPortProperties protocolPortProps = null;
    1820
    1921    public Server3(String gsdl3_src_home, String lang)
     
    2123        super(gsdl3_src_home, lang, gsdl3_src_home + File.separatorChar + "build.properties", "web"+File.separator+"logs");
    2224
    23         Property = new Server3Property();
     25        // config properties are loaded into the config_properties object
     26        // now test the port and protocol values are sane or exit.
     27        protocolPortProps = new ProtocolPortProperties(config_properties);
     28        if(protocolPortProps.hadError()) {
     29            String errorMsg = "Error with port/protocol in " + config_properties_file + ": " + protocolPortProps.getErrorMsg();
     30
     31            // print it everywhere, because port/protocol misconfiguration is a fatal error and we're exiting
     32            logger_.error(errorMsg);
     33            System.err.println(errorMsg);
     34            // If error, then quit this app as soon as possible
     35            System.exit(-1);
     36        }   
     37       
     38        Property = protocolPortProps.legacyMode ? new Server3Property() : new Server3Property(protocolPortProps.getProtocol());
    2439
    2540        String frame_title = dictionary.get("ServerControl.Frame_Title");
Note: See TracChangeset for help on using the changeset viewer.