Ignore:
Timestamp:
2018-08-24T20:44:34+12:00 (6 years ago)
Author:
Georgiy Litvinov
Message:

Get solr servlet name from build properties. Fixed port number property name

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gs3-extensions/solr/trunk/src/src/java/org/greenstone/gsdl3/service/GS2SolrSearch.java

    r32110 r32378  
    6262{
    6363
    64   public static final String SOLR_SERVLET_SUFFIX = "/solr";
    6564  protected static final String SORT_ORDER_PARAM = "sortOrder";
    6665  protected static final String SORT_ORDER_DESCENDING = "1";
     
    9796            globalProperties.load(Class.forName("org.greenstone.util.GlobalProperties").getClassLoader().getResourceAsStream("global.properties"));
    9897            String host = globalProperties.getProperty("tomcat.server", "localhost");
    99             String port = globalProperties.getProperty("tomcat.port", "8383");
     98            String port = globalProperties.getProperty("tomcat.port.http", "8383");
    10099            String protocol = globalProperties.getProperty("tomcat.protocol", "http");
     100            String solrContext = globalProperties.getProperty("solr.context", "solr");
    101101           
    102102            String portStr = port.equals("80") ? "" : ":"+port;
    103             solr_servlet_base_url = protocol+"://"+host+portStr+SOLR_SERVLET_SUFFIX;
     103            solr_servlet_base_url = protocol+"://"+host+portStr+"/"+solrContext;
    104104        } catch(Exception e) {
    105105            logger.error("Error reading greenstone's tomcat solr server properties from global.properties", e);
Note: See TracChangeset for help on using the changeset viewer.