My web side I am using Jsp and jQuery and my server side I am using Java with struts2. At my Java side I want to send data after my Ajax post. I want to write something like this:
response.getWriter().write(value);
However how can I get the response object on my controller? It doesn’t recognize “response” symbol. I think I should import something and set the response value? What to do from the beginning?
Thanks all.
Implement your controller with ServletResponseAware and you can get access to response object.