I use Spring MVC. I want to render some jsp by forwarding to it. And then I want to write the result to json.
For exmple I want to render my complex jsp and on exit I want to get: {"result":"ok","html":"......."}
How can I do this? I've tried to look at request.getRequestDispatcher("tutorMini").forward(request, response) But if I can't pass response to it, bcz it should write all output to it.
And I've tried to use some json tags in jsp, but it has some troubles with hierarchy: HTML output with jsp:include and json-taglib