Alexander Orbes Alexander Orbes - 1 year ago 122
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?

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download