PavanPL KalyanK wrote:JSON inside DAO implementation class ??
If your DAOs are in the business of generating a response, then you are definitely doing it wrong.
If you are doing Ajax "by hand", you're just making things hard on yourself. You should be using a library such as jQuery (or other of your choice) which makes Ajax, and evaluating JSON responses, easy as pie.