Hi

I have my application-context.xml configured as follows ...

<bean class="org.springframework.web.servlet.view.Conten tNegotiatingViewResolver">
<property name="mediaTypes">
<map>
<entry key="xml" value="application/xml"/>
<entry key="json" value="application/json" />
</map>
</property>
<property name="defaultViews">
<list>
<bean class="org.springframework.web.servlet.view.xml.Ma rshallingView">
<constructor-arg>
<bean class="org.springframework.oxm.xstream.XStreamMars haller">
<property name="autodetectAnnotations" value="true"/>
</bean>
</constructor-arg>
</bean>
<bean class="org.springframework.web.servlet.view.json.M appingJacksonJsonView"/>
</list>
</property>
</bean>

In my controller, I am mapping the request as follows ...

@RequestMapping(value = ("/foo.xml"), method = RequestMethod.GET)
@ResponseBody

On the browser, I call the api via http://localhost:9999/client/foo.xml?val1=bar

However, the return always sends back a json object embedded in the foo.xml response. Is there anything I miss? Please guide me.

Sincerely,

jacques83