1

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

1

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

  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.