Add jetty-servlets.jar file to default jetty to help users set up CORS

Description

This is a follow on to the +1 added to indicating that adding the jetty-servlets.jar (and a bit of configuration) correctly enables CORS.

  1. Add instructions to the user guide since this is a common task

  2. Hunting down the correct jar is a bother and we could include it by default (add a dependency on jetty-servlets.jar).

  3. We could added the commented out config entries to our web.xml to help make set up easier..

The following was suggested on GEOS-6605:

Environment

None

Activity

Show:
Jody Garnett
January 24, 2017, 10:10 PM

~jnewmoyer if you are still interested in - it should now be easier to enable CORS out of the box.

Jason Newmoyer
March 23, 2017, 2:46 PM

I cracked open the geoserver-2.10.2-bin and geoserver-2.10.2-war and don't see jetty-servlets-xxx.jar anywhere in the server lib or WEB-INF/lib.

In my experience this needs to be in the geoserver/WEB-INF/lib in order for the CORS filter to work in the web.xml. Along with the jetty-util jar.

Jody Garnett
March 23, 2017, 4:39 PM
Edited

You are correct I do not see it in the bin/lib folder, reopening.

Andrea Aime
March 24, 2018, 10:08 AM

Hi Torben, wasn't this fixed already?

Torben Barsballe
March 26, 2018, 4:18 PM

Yes, it was, here: https://github.com/geoserver/geoserver/pull/2625 (GEOS-7343). This is a duplicate; linked and closed accordingly.

Assignee

ReggieB

Reporter

Jody Garnett

Triage

None

Fix versions

None

Affects versions

Priority

Medium
Configure