Tis is an example of how we can organize work with SparkJava Web Framework and Sql2o database query library. Final result will be obtained as json string, using Jackson library.
Final result we can deploy on the OpenShift hosting using a simple cartridge.