I wouldn’t try to do the type of work you’re doing in a JSP. Consider using a servlet or action or controller (depending on the web framework you’re using).
Btw, I don’t see any reason for the code above not to work, but you most likely shouldn’t be calling flush yourself. I’m fairly certain that the JSP will try to flush the content it self when it is done.
I do know servlets, but they are a pain b/c every time I compile a servlet I have to restart the server (tomcat 5.5) this is a huge pain, and not practical at all when you’re just doing a learning exercise… (or in any other situation…)
so why do you say I should do this in a servlet and not a JSP?
Btw, I don’t see any reason for the code above not to work, but you most likely shouldn’t be calling flush yourself. I’m fairly certain that the JSP will try to flush the content it self when it is done.[/QUOTE]
Do you get a stacktrace? The “Something went wrong” isn’t very helpful…
It looks like the JSPAndAJAXExamples page has its own jar that needs to be in your WEB-INF/lib directory. It looks like the name is json_simple-1.1.jar. Which is different then the json.jar.