Project

General

Profile

« Previous | Next » 

Revision 5867

always re-write web.xml in case geoserver has been redeployed
http://bugzilla.ecoinformatics.org/show_bug.cgi?id=4307

View differences:

src/edu/ucsb/nceas/metacat/util/GeoserverUtil.java
128 128
			String configContents = FileUtil.readFileToString(configFileTemplate, "UTF-8");
129 129
			configContents = configContents.replace("_GEOSERVER_DATA_DIR_VALUE_", dataDir);
130 130
			FileUtil.writeFile(configFileDestination, new StringReader(configContents), "UTF-8");			
131
		} catch (PropertyNotFoundException pnfe) {
131
		} catch (Exception pnfe) {
132 132
			throw new MetacatUtilException(
133
					"Property error while setting geoserver config: " + pnfe.getMessage());
133
					"Property error while setting geoserver configuration. " +
134
					"Please verify geoserver installation. " + pnfe.getMessage());
134 135
		}
135
		catch (UtilException ue) {
136
			throw new MetacatUtilException(
137
					"Util error while setting geoserver config: " + ue.getMessage());
138
		}
139 136
	
140 137
	}
141 138
	
src/edu/ucsb/nceas/metacat/admin/GeoserverAdmin.java
187 187
					boolean reconfig = PropertyService.checkAndSetProperty(request, "geoserver.GEOSERVER_DATA_DIR");
188 188
					PropertyService.persistProperties();
189 189
					// put the web.xml in place
190
					reconfig = true; //force all the time in cases where geoserver has been redeployed
190 191
					if (reconfig) {
191 192
						GeoserverUtil.writeConfig();
192 193
					}

Also available in: Unified diff