[Geoserver-users] Env GEOSERVER_DATA_DIR not working

Hello!

I try to use the environment var GEOSERVER_DATA_DIR, but I do not get it working.
I use Win XP and tomcat 5.5
No matter what path I enter it is not working. (I have experience setting env. variables in windows).
In tomcat log I can read the following (not the "c:\geoserverdata\data" I put in env variable" :

- GEOSERVER_DATA_DIR: C:\tomcat\webapps\geoserver\data

Is this a bug or am I doing something wrong?
Anyone got the variable working with WinXP? Tomcat?

/Anders

Setting the environment variable will only work if you're running jetty and starting it with our scripts, as we check for it explicitly. If you don't use Jetty then you just have to pass the argument in to the JVM I think, as like a tomcat option.

Or the alternative (which is what I use with Tomcat) is to set in webapps/geoserver/WEB-INF/web.xml There should be an example in there telling you how.

best regards,

Chris

Anders wrote:

Hello!

I try to use the environment var GEOSERVER_DATA_DIR, but I do not get it working.
I use Win XP and tomcat 5.5
No matter what path I enter it is not working. (I have experience setting env. variables in windows).
In tomcat log I can read the following (not the "c:\geoserverdata\data" I put in env variable" :

- GEOSERVER_DATA_DIR: C:\tomcat\webapps\geoserver\data

Is this a bug or am I doing something wrong?
Anyone got the variable working with WinXP? Tomcat?

/Anders

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4005,46c488b1107451096210785!

Anders ha scritto:

Hello!

I try to use the environment var GEOSERVER_DATA_DIR, but I do not get it working.
I use Win XP and tomcat 5.5
No matter what path I enter it is not working. (I have experience setting env. variables in windows).
In tomcat log I can read the following (not the "c:\geoserverdata\data" I put in env variable" :

- GEOSERVER_DATA_DIR: C:\tomcat\webapps\geoserver\data

Is this a bug or am I doing something wrong?
Anyone got the variable working with WinXP? Tomcat?

Well, the two common issues are:
* you set the env variable in the UI, and then don't reopen the command
   line to start geoserver (if you are using the command line).
* you set the env variable in the UI, in the user environment, but then
   start GeoServer as a service, which will make it run as a different
   user (in this case you need to set the GEOSERVER_DATA_DIR in the
   system environment instead).

If you use the windows UI to set the environment variable, and then click the link in the menu to start geoserver, it should work (maybe a typo?).

Cheers
Andrea