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
Pretty simple approach would be to use taglib - json something like this :
<%@ taglib prefix="json" uri="http://www.atg.com/taglibs/json" %>
Then you can use json tags to create it out of list:
Above jsp when executes will O/P following :
[
{"username":"varun","password":"*****","email":"johndoe@sssdotcom"},
{"username":"ved","password":"*****","email":"johndoe1@sssdotcom"},
{"username":"von","password":"*****","email":"johndoe2@sssdotcom"}
]
Thats all folks!