Results 1 to 1 of 1

Thread: Spring 3.2 DefferedResult with ajax request.

  1. #1
    Join Date
    Nov 2011
    Posts
    7

    Default Spring 3.2 DefferedResult with ajax request.

    Hi,

    I am using DefferedResult with ajaxrequest.In xml the messageconverter is configured as

    <bean id="jacksonMessageConverter"
    class="org.springframework.http.converter.json.Map pingJacksonHttpMessageConverter"></bean>
    <bean
    class="org.springframework.web.servlet.mvc.annotat ion.AnnotationMethodHandlerAdapter">
    <property name="messageConverters">
    <list>
    <ref bean="jacksonMessageConverter" />
    </list>
    </property>
    </bean>
    This works for all ajax requests, except the one for which DefferedResult is used.In that case the response seems to be expected as as xml ,as I can see in firebug, and since I am returning a Map, it is giving xml parse error and the ajax response object is becoming null.

    Do I need to set the response content-type particularly for the cases where DeffereResult is used? Or how can I get the response as json instead of xml?I am using spring 3.2.0.RELEASE version for web and web-mvc and 3.1.1.RELEASE for other spring modules.

    Thanks,
    Dipti.
    Last edited by deeps83; Dec 24th, 2012 at 05:02 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •