Revision 7566
Added by ben leinfelder over 11 years ago
metacat-index/src/main/java/edu/ucsb/nceas/metacat/index/MetacatIndexServlet.java | ||
---|---|---|
28 | 28 |
|
29 | 29 |
|
30 | 30 |
|
31 |
import java.io.File; |
|
31 | 32 |
import java.io.IOException; |
32 | 33 |
import java.net.URL; |
33 | 34 |
import java.util.List; |
... | ... | |
68 | 69 |
// overriding the d1 properties as needed |
69 | 70 |
try { |
70 | 71 |
// find the sibling metacat.properties file |
71 |
String metacatPropertiesFilePath = config.getInitParameter("metacat.properties.path"); |
|
72 |
String fullMetacatPropertiesFilePath = config.getServletContext().getRealPath(metacatPropertiesFilePath); |
|
72 |
String metacatPropertiesFilePath = config.getServletContext().getInitParameter("metacat.properties.path"); |
|
73 |
File contextDeploymentDir = new File(config.getServletContext().getRealPath("/")); |
|
74 |
String fullMetacatPropertiesFilePath = contextDeploymentDir.getParent() + metacatPropertiesFilePath; |
|
73 | 75 |
Settings.augmentConfiguration(fullMetacatPropertiesFilePath); |
74 | 76 |
} catch (ConfigurationException e) { |
75 | 77 |
log.error("Could not initialize shared Metacat properties. " + e.getMessage(), e); |
metacat-index/src/main/java/edu/ucsb/nceas/metacat/index/SystemMetadataEventListener.java | ||
---|---|---|
109 | 109 |
// use default metacat hazelcast.xml file in metacat deployment |
110 | 110 |
configFileName = |
111 | 111 |
Settings.getConfiguration().getString("application.deployDir") + |
112 |
"/" + |
|
112 | 113 |
Settings.getConfiguration().getString("application.context") + |
113 | 114 |
"/WEB-INF/hazelcast.xml"; |
114 | 115 |
try { |
Also available in: Unified diff
correctly look up the context init parameter for the metacat properties file