Alexander Orbes Alexander Orbes - 3 months ago 31
reST (reStructuredText) Question

Restful Web services with java_web_app and json

i create a restful web service using entities classes from database:

image 1

and this is my web.xml

image 2
It works with xml data but not with json. How to enable json data return?


You have to add dependencies for JSON support in the POM.xml such as jackson json jar [OR] add the jackson json jar to project build path and WEB-INF/lib folder.