Tuesday 21 November 2017

How to send back the JSON object response from a servlet??

jsonobjj is the Json Object that is sent in the response. flush() sends the binary output stream.

response.setContentType("application/json");
response.setCharacterEncoding("UTF-8");
PrintWriter out = response.getWriter();
out.print(jsonobjj);
out.flush();

No comments:

Post a Comment

extraClientlibs Usage

The purpose of property "extraClientlibs" is to selectively load client library for a dialog. This prevents the unnecessary load o...