Thank you for the answer.
My  geoserver istance is deployed on a jboss application server so in the
deploy directory I've got the geoserver.war directory.
I suppose that the configuration files were deleted because I didn't defined
the GEOSERVER_DATA_DIR in my web.xml file (I thought that geoserver uses the
default data directory mantaining the data even if there isn't defined any
one in web.xml)

I've tried to define a postgis datastore and adding some layers. The files
generated by geoserver are:
    - GEOSERVER_DATA_DIR/workspaces/ws_name/ds_name/datastore.xml
        where there are the parameters about the connection
    - GEOSERVER_DATA_DIR/workspaces/ws_name/ds_name/l_name/feature.xml
    - GEOSERVER_DATA_DIR/workspaces/ws_name/ds_name/l_name/layer.xml
        where there are the parameters about the layer , its position and
projection, its style..

For every 'object' I saw there is an id tag, for example:
    <id>LayerInfoImpl--5838fbbb:12f1062e5eb:-7e80</id>
    <id>FeatureTypeInfoImpl--5838fbbb:12f1062e5eb:-7e81</id>
    ...
Is there a meaning for each part of the id code or could it be setted with
some other code? I tried to edit it on an existing layer and it keeps on
working. But if I try to create a new layer in the same datastore it is
never loaded. This are the files I create:
    - GEOSERVER_DATA_DIR/workspaces/ws_name/ds_name/newl_name/feature.xml
    - GEOSERVER_DATA_DIR/workspaces/ws_name/ds_name/newl_name/layer.xml
I update the layer and feature name and correctly set the id with some new
values in both files.

Are there other files I have to edit to make geoserver load the new layer?



----- Original Message ----- 
From: "Luca Morandini" <[email protected]>
To: <[email protected]>
Sent: Thursday, March 31, 2011 8:02 PM
Subject: Re: [Geoserver-users] Geoserver dynamic configuration


> On 03/31/2011 07:30 PM, Federica De Martin wrote:
>> Hi, everybody. I'm new to geoserver and I would like to know something 
>> more about
>> how it works.
>> I saw that when geoserver application is started and I log in as admin, 
>> or with
>> another user (that I created) , it writes some xml configuration files in 
>> the data
>> folder to save the workspaces/layer...
>> If I restart the application I saw that this configuration files 
>> disappear; is
>> there a way to keep saved this files?
>
> Rather odd... every change to the configuration is saved into XML 
> files/property
> files  scattered all over the GEOSERVER_DATA_DIR: could you specify which 
> is the
> XML file that gets deleted ?
>
>
>> And then another question: I would like to configure geoserver from 
>> another
>> application, is it possible? I tried to simply add some files to the 
>> geoserver
>> data folder (supposing geoserver already started) but it doesn't load the 
>> new
>> workspace dinamically. Is it possible in some other way? Are there some 
>> api I
>> should use/call?
>
> The ReST admin API is what you need
> (http://docs.geoserver.org/latest/en/user/restconfig/index.html).
>
> On the other hand, adding/patching files manually may work (I did it in a
> clustered environment) but provided you know what you're doing !
>
>
>> Please, help me understand something more.
>
> You're welcome.
>
> Regards,
>
> Luca Morandini
> http://www.lucamorandini.it
>
>
> ------------------------------------------------------------------------------
> Create and publish websites with WebMatrix
> Use the most popular FREE web apps or write code yourself;
> WebMatrix provides all the features you need to develop and
> publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
> _______________________________________________
> Geoserver-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users 


------------------------------------------------------------------------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to