*/
private void doDelete(Request req, Response resp) throws RestletException, GeoWebCacheException {
String layerName = (String) req.getAttributes().get("layer");
findTileLayer(layerName, layerDispatcher);
try {
Configuration configuration = layerDispatcher.removeLayer(layerName);
if (configuration == null) {
throw new RestletException("Configuration to remove layer not found",
Status.SERVER_ERROR_INTERNAL);
}
configuration.save();
} catch (IOException e) {
throw new RestletException(e.getMessage(), Status.SERVER_ERROR_INTERNAL, e);
}
}