This question already has an answer here:

To enable CORS filter I added the following in web.xml file in webapps/Geoserver/WEB-INF

<filter>
 <filter-name>cross-origin</filter-name>
 <filter-class>org.eclipse.jetty.servlets.CrossOriginFilter</filter-class>

...

<filter-mapping>
    <filter-name>cross-origin</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>

After adding above, I restarted GeoServer. Now, when I access GeoServer, I get following error:

HTTP ERROR: 503

Problem accessing /geoserver/. Reason:

Service Unavailable

marked as duplicate by Ian Turton Jul 30 '17 at 16:11

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • how are you installing & running geoserver? which version of GeoServer are you using? – Ian Turton Dec 5 '16 at 11:46
  • I have installed Geoserver v2.9.1 window installation package (with manual startup). – Senthil S Dec 5 '16 at 11:48

We had the same issue, after enabling CORS by removing the comments in web.xml original file supplied with GeoServer, GeoServer was no longer starting properly in any configuration (we tried using Mac OS X installer, with the platform independent binary and using Apache/Tomcat).

Finally, we managed to get the configuration to work using Apache/Tomcat but not using the default filter org.eclipse.jetty.servlets.CrossOriginFilter specified in web.xml supplied file but the Tomcat org.apache.catalina.filters.CorsFilter filter, as per https://enable-cors.org/server_tomcat.html (see also jgrocha answer at https://stackoverflow.com/questions/22363192/cors-tomcat-geoserver):

<filter>
  <filter-name>CorsFilter</filter-name>
  <filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
</filter>
<filter-mapping>
  <filter-name>CorsFilter</filter-name>
  <url-pattern>/*</url-pattern>
</filter-mapping>

Have you check jar file in :

WEB-INF/lib/jetty-servlets*.jar

(not 'jetty-servlet'!)

If you don't have You can download in here.

and

You can check your Jetty version in :

[GEOSERVER_HOME]/lib

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