Wednesday, June 3, 2015

Restful API using Java/Jersey and MongoDB


About this post

In this example I have created a REST web-service which stores some data about the books in the MongoDB database and will retrieve those data in the JSON format. I have used Openshift cloud platform to host the web application. 


Project structure

Project structure






ServletContainer.class


java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.sun.jersey.spi.container.servlet.ServletContainer

It is a Servlet Filter for deploying root resource classes.