Package org.vfny.geoserver.global.xml

Examples of org.vfny.geoserver.global.xml.XMLConfigReader


        //DJB: changed for geoserver_data_dir   
       // File rootDir = new File(sc.getRealPath("/"));
       
        File rootDir =  GeoserverDataDirectory.getGeoserverDataDirectory(sc);

        XMLConfigReader configReader;

        try {
            configReader = new XMLConfigReader(rootDir,sc);
        } catch (ConfigurationException configException) {
            configException.printStackTrace();

            return mapping.findForward("welcome");

            //throw new ServletException( configException );
        }

        if (configReader.isInitialized()) {
            // These are on separate lines so we can tell with the
            // stack trace/debugger where things go wrong
            wmsDTO = configReader.getWms();
            wfsDTO = configReader.getWfs();
            geoserverDTO = configReader.getGeoServer();
            dataDTO = configReader.getData();
        } else {
            System.err.println(
                "Config Reader not initialized for LoadXMLAction.execute().");

            return mapping.findForward("welcome");
View Full Code Here


        ServletContext sc = as.getServletContext();
        File geoserverDataDir = GeoserverDataDirectory.getGeoserverDataDirectory(sc); //geoserver_home fix

        try {
            File f = geoserverDataDir; //geoserver_home fix
            XMLConfigReader cr = new XMLConfigReader(f,sc);
            GeoServer gs = new GeoServer();
            sc.setAttribute(GeoServer.WEB_CONTAINER_KEY, gs);
           
            Data dt = new Data(f,gs);
            sc.setAttribute(Data.WEB_CONTAINER_KEY, dt);
           
            WFS wfs = new WFS();
            sc.setAttribute(WFS.WEB_CONTAINER_KEY, wfs);
           
            WMS wms = new WMS();
            sc.setAttribute(WMS.WEB_CONTAINER_KEY, wms);
           
            GeoValidator gv = new GeoValidator();
            sc.setAttribute(GeoValidator.WEB_CONTAINER_KEY, gv);

            if (cr.isInitialized()) {
                gs.load(cr.getGeoServer(),sc);
                wfs.load(cr.getWfs());
                wms.load(cr.getWms());
                dt.load(cr.getData());
               
                wfs.setGeoServer(gs);
                wms.setGeoServer(gs);
                wfs.setData(dt);
                wms.setData(dt);
View Full Code Here

TOP

Related Classes of org.vfny.geoserver.global.xml.XMLConfigReader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.