Hallo, I need to parse the content of geowebcache.xml from Geoserver.
I tried this tutorial:
http://docs.geoserver.org/2.5.x/en/developer/programming-guide/ows-services/implementing.html
and my first attempt was:
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.ServletException;
import org.vfny.geoserver.global.GeoserverDataDirectory;
public class CustomCapabilities {
public CustomCapabilities() {}
public void getCustomCapabilities(HttpServletRequest request,
HttpServletResponse response)
throws ServletException {
String geoserverDataDir =
GeoserverDataDirectory.getGeoserverDataDirectory().getAbsolutePath();
File geoWebCacheXml = new File(geoserverDataDir +
"/gwc/geowebcache.xml");
....
}
}
The problem is, this does not longer work if geowebcache.xml isn't in
GEOSERVER_DATA_DIR/gwc/geowebcache.xml
Is There a easy way to find out on runtime which geowebcache.xml is really
used by Geoserver?
I'm using currently Geoserver 2.3.0, which provides Geowebcache 1.4, but I
could upgrade if needed (the upgrade is already on the TODO list)
Thank you, Tommaso