I\'ve created a JSP application, which gets results based on a user search (using lucene). I store the results in a Bean.
I\'m also using Jquery Ajax to display the
Ultimately its being trasnferred over http. So, creating a json object wont do much help.
I am not a java expert but you can create a simple string which matches with json structure and then parse it on client side.
Like
string s = { "title": "testTitle", "link" : "testLink"}
out.println(s)
This will do the trick.
Edit: by seeing Darin's answer,
Include this on you java code,
<%@page contentType="application/json; charset=UTF-8"%>