I am having problems using Gzip compression and JQuery together. It seems that it may be caused by the way I am sending JSON responses in my Struts Actions. I use the next code
Instead of
try {
response.getWriter().write(json.toString());
} catch (IOException e) {
throw new ApplicationException("IOException in populateWithJSON", e);
}
try this
try {
json.write(response.getWriter());
} catch (IOException e) {
throw new ApplicationException("IOException in populateWithJSON", e);
}
because this will avoid creating a string and the JSONObject will directly write the bytes to the Writer object