Servlet Support

Originally the Olingo OData 2.0 server library has been implemented based on JAX-RS to take advantage of the REST based CXF features.

With the development of Olingo URI parser it was possible now also to offer a purely servlet-based approach. This has some advantages on restricted runtime environments and reduces the amount of required dependencies. Disadvantage is that some REST features which are out of the box are not available.

Both solutions JAX-RS and Non-JAX-RS are supported.

For testing the feature it is recommended to start with the sample setup using the Olingo archetype and do the following modifications.

Maven Dependencies

For a plain servlet based approach it is possible to exclude JAX-RS dependencies. A simple way is to exclude them with Maven:


A JAX-RS implementation dependency like Apache CXF is not required for runtime.

Adopt web.xml

For using the servlet based approach a Servlet must be configured in web.xml file (and probably an old servlet replaced):



Ensure that all runtime dependencies to Apache CXF are removed from the sample project.

After this modification the service should work like before.

Copyright © 2013-2022, The Apache Software Foundation
Apache Olingo, Olingo, Apache, the Apache feather, and the Apache Olingo project logo are trademarks of the Apache Software Foundation.