2

In order to set CORS correctly in Geoserver, I have to download some jar files and then edit the web.xml file.

I have a really old version of Geoserver(2.1.3) that runs Jetty 6.8.1 and there are no jars for this version, at least according to this. I was thinking to upgrading to the latest Geoserver (2.8.0). What version of Jetty does it run? Will I find the right jars to implement the CORS setting?

Vince
  • 20,017
  • 15
  • 45
  • 64
slevin
  • 1,129
  • 19
  • 39
  • 1
    To get around the lack of jars, the following worked for me: http://sourceforge.net/p/geoserver/mailman/message/32391594/ – dbaston Oct 02 '15 at 19:42
  • @dbaston Thanks. I tried this, but does not work for me, for reason I cannot explain – slevin Oct 02 '15 at 22:03
  • @dbaston Hey, wait. In step 1 it says Instead, put content of this archive...into the ....folder. How did you put it? You put just the zip folder as is? You unzip it? Because I dont know how to put the zip in there to make it work. Thanks again – slevin Oct 02 '15 at 22:23

2 Answers2

3

You mean GeoServer 2.1.3 runs 6.1.8 (not 6.8.1), correct?

According to this source the included library is still Jetty 6.1.8.

Thomas
  • 1,477
  • 8
  • 19
  • Interesting. Is this official? Because, here : http://gis.stackexchange.com/questions/120378/geoserver-xml-header-for-cors-xmlhttprequest (first answer) he says that he runs Georerver v 2.6.2 . and so he gets jars for Jetty v 7.6.13.v20130916 . So I guess Geoserver 2.8.0 runs higher Jetty version. Right? – slevin Oct 02 '15 at 22:12
  • Slevin -
    I just downloaded the official 2.8.0 release from geoserver.org, and inside the lib folder is jetty-6.1.8.jar. Judging from the answer in the SO link you posted, it sounded like the person had upgraded that library manually.
    – Thomas Oct 02 '15 at 22:51
  • Thanks for testing it. As for the link, either he updated manually, or maybe he got Jetty 7 from Boundless (he says he uses Boundless). I dont know what to do, updating Geoserver now seems pointless and setting CORS on my existing Geoserver does not work – slevin Oct 03 '15 at 10:19
  • 1
    How about to run GeoServer on Tomcat? – user30184 Oct 03 '15 at 11:02
  • @user30184 How do I do this? Is there a version of Geoserver that runs Tomcat instead of Jetty? Thanks – slevin Oct 03 '15 at 14:42
  • @ThomasHorner I just made the transistion to Geoserver 2.8.0. You are right, still runs Jetty 6.1.8. Anyway I will run tests with CORS and proxys on this one and let you know – slevin Oct 03 '15 at 14:45
  • 1
    Read http://docs.geoserver.org/stable/en/user/installation/war.html. All Geoserver versions which have ever been made run also on Tomcat. The Windows installer and zipped GeoServer just installs Jetty and GeoServer at the same time because it is a handy way for getting everything ready for the play. For real production most users run GeoServer on Tomcat. – user30184 Oct 03 '15 at 14:58
1

The actual version of geoserver (v2.8.2) released on January 26, 2016 ships v6.1.8 of Jetty.

But it seems that the branch 2.9 will ship v9 of Jetty, as Justin Deoliveria has done some work on it and the related ticket is closed.

Francisco Puga
  • 4,618
  • 21
  • 40