Thank you guys for your submissions. I used the following to make it work.
The following filter has been added to my web.xml application:
<filter> <filter-name>GZipFilter</filter-name> <filter-class> org.mortbay.servlet.GzipFilter</filter-class> <init-param> <param-name>mimeTypes</param-name> <param-value>application/json</param-value> </init-param> </filter> <filter-mapping> <filter-name>GZipFilter</filter-name> <url-pattern>*.data</url-pattern> </filter-mapping>
And in servlet.xml the following bean property has been added for the DataViewController bean.
<beans:property name="contentType" value="application/json" />
source share