Project

General

Profile

« Previous | Next » 

Revision 4132

Added by daigle over 16 years ago

Differentiate between tomcat directory and deployment directory.

View differences:

lib/metacat.properties
23 23
application.metacatVersion=@metacatVersion@
24 24
## This is autodiscovered and populated by the config utility
25 25
application.tomcatDir=
26
application.deployDir=
26 27
## This is autodiscovered and populated by the config utility
27 28
application.context=
28 29
application.default-style=default
......
327 328

  
328 329
######## junit test section  ################
329 330
# junittesturl=@systemidserver@@servlet-path@
331
test.printdebug=true
330 332
test.metacat.url=http://localhost:8080/knb/metacat
331
test.mcuser="uid=kepler,o=unaffiliated,dc=ecoinformatics,dc=org"
332
test.mcpassword="kepler"
333
test.mcanotheruser="uid=tao,o=NCEAS,dc=ecoinformatics,dc=org"
334
test.mcanotherpassword="yourpass"
335
test.piscouser="uid=tao,o=PISCO,dc=ecoinformatics,dc=org"/>
336
test.piscopassword="yourpass"/>
337
test.lteruser="uid=jtao,o=LTER,dc=ecoinformatics,dc=org"/>
338
test.lterpassword="yourpass"/>
333
test.mcuser=uid=kepler,o=unaffiliated,dc=ecoinformatics,dc=org
334
test.mcpassword=kepler
335
test.mcanotheruser=uid=test,o=NCEAS,dc=ecoinformatics,dc=org
336
test.mcanotherpassword=test
337
test.piscouser=uid=tao,o=PISCO,dc=ecoinformatics,dc=org/>
338
test.piscopassword=yourpass/>
339
test.lteruser=uid=jtao,o=LTER,dc=ecoinformatics,dc=org/>
340
test.lterpassword=yourpass/>
339 341

  
340 342
######## Harvester section            #########################################
341 343
connectToMetacat=true
src/edu/ucsb/nceas/metacat/MetacatReplication.java
43 43
import edu.ucsb.nceas.metacat.util.MetaCatUtil;
44 44
import edu.ucsb.nceas.metacat.util.SessionData;
45 45
import edu.ucsb.nceas.metacat.util.SystemUtil;
46
import edu.ucsb.nceas.utilities.FileUtil;
46 47
import edu.ucsb.nceas.utilities.GeneralPropertyException;
47 48
import edu.ucsb.nceas.utilities.PropertyNotFoundException;
48 49

  
......
541 542
			IOException, MalformedURLException, PropertyNotFoundException {
542 543
		
543 544
		// the path to be uploaded to
544
		String certPath = PropertyService.getProperty("application.tomcatDir")
545
				+ "/webapps/" + PropertyService.getProperty("application.context"); 
545
		String certPath = PropertyService.getProperty("application.deployDir")
546
				+ FileUtil.getFS() + PropertyService.getProperty("application.context"); 
546 547

  
547 548
		// get filename from the URL of the certificate
548 549
		String filename = certURL;
src/edu/ucsb/nceas/metacat/MetaCatServlet.java
79 79
import edu.ucsb.nceas.metacat.util.RequestUtil;
80 80
import edu.ucsb.nceas.metacat.util.SessionData;
81 81
import edu.ucsb.nceas.metacat.util.UtilException;
82
import edu.ucsb.nceas.utilities.FileUtil;
82 83
import edu.ucsb.nceas.utilities.GeneralPropertyException;
83 84
import edu.ucsb.nceas.utilities.PropertyNotFoundException;
84 85

  
......
3072 3073
            if (DocumentImpl.getDataFileLockGrant(docid)) 
3073 3074
            {
3074 3075
              // Save the data file to disk using "docid" as the name
3075
              String datafilepath = PropertyService.getProperty("datafilepath");
3076
              String datafilepath = PropertyService.getProperty("application.datafilepath");
3076 3077
              File dataDirectory = new File(datafilepath);
3077 3078
              dataDirectory.mkdirs();
3078 3079
              File newFile = null;
......
3205 3206
                    //If document get lock data file grant
3206 3207
                    if (DocumentImpl.getDataFileLockGrant(docid)) {
3207 3208
                        // Save the data file to disk using "docid" as the name
3208
                        String datafilepath = PropertyService.getProperty("datafilepath");
3209
                        String datafilepath = PropertyService.getProperty("application.datafilepath");
3209 3210
                        File dataDirectory = new File(datafilepath);
3210 3211
                        dataDirectory.mkdirs();
3211 3212
                        File newFile = null;
......
3683 3684
        	
3684 3685
        	try {
3685 3686
				directoryName = 
3686
					PropertyService.getProperty("application.tomcatDir") + "/webapps/"
3687
					+ PropertyService.getProperty("application.context") + "/sitemaps";
3687
					PropertyService.getProperty("application.deployDir") + FileUtil.getFS()
3688
					+ PropertyService.getProperty("application.context") + FileUtil.getFS() + "sitemaps";
3688 3689
				skin = PropertyService.getProperty("application.default-style");
3689 3690
				sitemapInterval = 
3690 3691
					Integer.parseInt(PropertyService.getProperty("sitemapInterval"));
src/edu/ucsb/nceas/metacat/util/SystemUtil.java
208 208
	 * @return string holding the context directory
209 209
	 */
210 210
	public static String getContextDir() throws PropertyNotFoundException {
211
		return PropertyService.getProperty("application.tomcatDir") + FileUtil.getFS()
212
				+ "webapps" + FileUtil.getFS()
211
		return PropertyService.getProperty("application.deployDir") + FileUtil.getFS()
213 212
				+ PropertyService.getProperty("application.context");
214 213
	}
215 214

  

Also available in: Unified diff