[Geoserver-devel] changing data directory using geoserver.war with jetty

Hi,

i'm going to use geoserver 2.8 for the first time as an servlet in my
existing jetty9-server.

I need to specify an external data_directory and would like to to it with a
context file.

But i don't know the exact format and where to put this file. I tried the
directory "contexts" of jetty but it did not work for me. Tryed a lot of
other ways but with no result.

GS Doc said "To specify the data directory using a servlet context
parameter, create the following <context-param> element in the
WEB-INF/web.xml file for the GeoServer application:"
but that is not clear for me.

Regards
walter

ps: sorry, repost from the user-list but i did not get any response.

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/changing-data-directory-using-geoserver-war-with-jetty-tp5229890.html
Sent from the GeoServer - Dev mailing list archive at Nabble.com.

You may wish to visit the support page for a range of support options, including commercial support.

Here is the Wikipedia page - https://en.m.wikipedia.org/wiki/Deployment_descriptor ( web.xml is a file contained inside the geoserver war file that acts like driving directions for the application server ).

On Tue, Oct 13, 2015 at 4:37 PM walter.nordmann <walter.nordmann@anonymised.com> wrote:

Hi,

i’m going to use geoserver 2.8 for the first time as an servlet in my
existing jetty9-server.

I need to specify an external data_directory and would like to to it with a
context file.

But i don’t know the exact format and where to put this file. I tried the
directory “contexts” of jetty but it did not work for me. Tryed a lot of
other ways but with no result.

GS Doc said “To specify the data directory using a servlet context
parameter, create the following element in the
WEB-INF/web.xml file for the GeoServer application:”
but that is not clear for me.

Regards
walter

ps: sorry, repost from the user-list but i did not get any response.


View this message in context: http://osgeo-org.1560.x6.nabble.com/changing-data-directory-using-geoserver-war-with-jetty-tp5229890.html
Sent from the GeoServer - Dev mailing list archive at Nabble.com.



Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel


Jody Garnett

jody.garnett wrote

You may wish to visit the support page for a range of support options,
including commercial support.

Ok, i'll check that. But be aware, openstreetmap is mainly a project driven
by private members which can't pay for commercial support.

I got the info that using war-files as servlets is the preferred way to
install geoserver and i agree. That's because program code and data are
strictly seperated - if (and that is the problem!) and only if you manage to
split those areas. There is a big documentation gap in doing that. 2
sentences for Tomcat and that is all i found :frowning:

Regards
walter

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/changing-data-directory-using-geoserver-war-with-jetty-tp5229890p5229988.html
Sent from the GeoServer - Dev mailing list archive at Nabble.com.

On Wed, Oct 14, 2015 at 10:41 AM, walter.nordmann <walter.nordmann@anonymised.com.>
wrote:

jody.garnett wrote
> You may wish to visit the support page for a range of support options,
> including commercial support.

Ok, i'll check that. But be aware, openstreetmap is mainly a project driven
by private members which can't pay for commercial support.

What Jody really meant is, on this list there are over 2000 subscribers:
what you are asking is more servlet containers related than GeoServer
specific,
there should be a lot of other users here that have an idea, but if none
can/wants to help, there is always commercial support.

Personally I don't know the answer, we don't deploy in Jetty, and when
we need to setup the data dir, we normally use environment variables,
not servlet context parameters.
Maybe lots of other people do it that way too, and it might explain
why you haven't got a response so far (too narrow question in an area
that nobody dabbles into).

Cheers
Andrea

--

GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

*AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*

Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.

-------------------------------------------------------

Hi Walter,

···

On Wed, Oct 14, 2015 at 1:28 AM, walter.nordmann <walter.nordmann@anonymised.com> wrote:

GS Doc said “To specify the data directory using a servlet context
parameter, create the following element in the
WEB-INF/web.xml file for the GeoServer application:”

Are you referring to this page?
http://docs.geoserver.org/latest/en/user/datadirectory/data-dir-setting.html#web-archive

What is not clear to you in that sentence?
You should download GeoServer as a Web archive, open up the geoserver.war file (it’s a ZIP-file-in-disguise) and reach out for the WEB-INF/web.xml file in it: you should see other context parameter definitions close to the top, simply add yours as suggested in the user guide.

Hope this helps.

Best regards,
Stefano Costa

==
GeoServer Professional Services from the experts! Visit
[http://goo.gl/it488V](http://goo.gl/it488V) for more information.
==
Dott. Stefano Costa
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:     +39 0584 1660272

[http://www.geo-solutions.it](http://www.geo-solutions.it)
[http://twitter.com/geosolutions_it](http://twitter.com/geosolutions_it)

-------------------------------------------------------
AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate.
Il loro utilizzo è consentito esclusivamente al destinatario del
messaggio, per le finalità indicate nel messaggio stesso. Qualora
riceviate questo messaggio senza esserne il destinatario, Vi preghiamo
cortesemente di darcene notizia via e-mail e di procedere alla
distruzione del messaggio stesso, cancellandolo dal Vostro sistema.
Conservare il messaggio stesso, divulgarlo anche in parte,
distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità
diverse, costituisce comportamento contrario ai principi dettati dal
D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely
for the attention and use of the named addressee(s) and may be
confidential or proprietary in nature or covered by the provisions of
privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New
Data Protection Code).Any use not in accord with its purpose, any
disclosure, reproduction, copying, distribution, or either
dissemination, either whole or partial, is strictly forbidden except
previous formal approval of the named addressee(s). If you are not the
intended recipient, please contact immediately the sender by
telephone, fax or e-mail and delete the information in this message
that has been received in error. The sender does not give any warranty
or accept liability as the content, accuracy or completeness of sent
messages and accepts no responsibility  for changes made after they
were sent or for other risks which arise as a result of e-mail
transmission, viruses, etc.

geowolf wrote

What Jody really meant is, on this list there are over 2000 subscribers:
what you are asking is more servlet containers related than GeoServer
specific,
there should be a lot of other users here that have an idea, but if none
can/wants to help, there is always commercial support.

i agree, that the question is quite specific to ask on a dev-list, but here
are only two list (user and dev). So i asked both of them.

Personally I don't know the answer, we don't deploy in Jetty, and when
we need to setup the data dir, we normally use environment variables,
not servlet context parameters.

i tried that without any luck, but because you say, that's the preferred
way, i'll concentrate on that again.

btw: Who told you, that this is the preferred way? Do you see my problem?

Thanks and greetings from germany
walter

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/changing-data-directory-using-geoserver-war-with-jetty-tp5229890p5230008.html
Sent from the GeoServer - Dev mailing list archive at Nabble.com.

Stefano Costa-4 wrote

Are you referring to this page?
http://docs.geoserver.org/latest/en/user/datadirectory/data-dir-setting.html#web-archive

Yes, i do.

What is not clear to you in that sentence?
You should download GeoServer as a Web archive
&lt;http://sourceforge.net/projects/geoserver/files/GeoServer/2.8.0/geoserver-2.8.0-war.zip&gt;,
open up the geoserver.war file (it's a ZIP-file-in-disguise) and reach out
for the WEB-INF/web.xml file in it: you should see other context parameter
definitions close to the top, simply add yours as suggested in the user
guide.

Patching an executable? I know, that this is quite easy with java and
thougth about doing that *if nothing else helps*. Sorry, but that is not "my
way".

Regards
walter

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/changing-data-directory-using-geoserver-war-with-jetty-tp5229890p5230013.html
Sent from the GeoServer - Dev mailing list archive at Nabble.com.

On Wed, Oct 14, 2015 at 11:23 AM, walter.nordmann <walter.nordmann@anonymised.com.>
wrote:

geowolf wrote
> What Jody really meant is, on this list there are over 2000 subscribers:
> what you are asking is more servlet containers related than GeoServer
> specific,
> there should be a lot of other users here that have an idea, but if none
> can/wants to help, there is always commercial support.

i agree, that the question is quite specific to ask on a dev-list, but here
are only two list (user and dev). So i asked both of them.

Ah, did not notice this was the devel list. Yeah, wrong list for such kind
of question,
a lot smaller audience, and here the discussion topic is only one,
how to improve GeoServer own code/functionality, it's a list by developers
for developers. You should ask on the users list instead.

btw: Who told you, that this is the preferred way? Do you see my problem?

Nobody told me is the preferred way. I've been a core developer of GeoServer
for 9 years now, and that's how I always did it (well, in some cases
also changed the web.xml file, but it's annoying to have to change it every
time
one upgrades GeoServer)

Cheers
Andrea

--

GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

*AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*

Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.

-------------------------------------------------------

geowolf wrote

Ah, did not notice this was the devel list. Yeah, wrong list for such kind
of question,
a lot smaller audience, and here the discussion topic is only one,
how to improve GeoServer own code/functionality, it's a list by developers
for developers. You should ask on the users list instead.

did it two days ago.
http://osgeo-org.1560.x6.nabble.com/setting-Servlet-context-parameter-in-jetty-tp5229293.html
- no response :frowning:

Nobody told me is the preferred way. I've been a core developer of
GeoServer
for 9 years now, and that's how I always did it.

That's of course the easy way - develop a program and than you don't need a
documentation :wink:

Regards
walter

Btw: the User-Documentation of Geoserver is very, very good and helped me a
lot. There is just a gap in the installation/getting to work area.

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/changing-data-directory-using-geoserver-war-with-jetty-tp5229890p5230031.html
Sent from the GeoServer - Dev mailing list archive at Nabble.com.