2

I tried to enable CORS by uncommenting the necessary lines in the web.xml file of geoserver. However, I didn't know that I also had to make sure having the correct jetty servlets jar file in my WEB-INF/lib folder (as described in this post). As the CORS didn't work I thought I had to restart tomcat, but since I did that I got an error that jetty couldn't be found:

Exception starting filter cross-origin java.lang.ClassNotFoundException: org.eclipse.jetty.servlets.CrossOriginFilter

Now I tried to find out which jetty version I use to get the correct servlets jar file, but somehow I cannot find any installation of jetty in my geoserver folder. I installed geoserver with the war file and running it on tomcat. And as I understood jetty comes together with geoserver, so it should exists...

What should be my next step now?

EDIT: geoserver version is 2.13.2

JoeBe
  • 1,230
  • 1
  • 9
  • 20

1 Answers1

3

If you are using tomcat then any reference to jetty is a red herring. Try following these instructions for tomcat.

Ian Turton
  • 81,417
  • 6
  • 84
  • 185
  • Thanks Ian! This solved my issue. I was confused why there would be a reference to jetty in the web.xml file when I use tomcat... – JoeBe Aug 20 '18 at 16:31