add(new AjaxLink("reload.catalogConfig") {
@Override
public void onClick(AjaxRequestTarget target) {
try {
GeoServerLoader loader = GeoServerExtensions.bean(GeoServerLoader.class);
synchronized (org.geoserver.config.GeoServer.CONFIGURATION_LOCK) {
getCatalog().getResourcePool().dispose();
loader.reload();
info(getLocalizer().getString("catalogConfigReloadedSuccessfully", StatusPage.this));
}
} catch(Exception e) {
LOGGER.log(Level.SEVERE, "An error occurred while reloading the catalog", e);