Problem with Spring 3 + JSON : HTTP status 406?

前端 未结 5 2208
一整个雨季
一整个雨季 2021-02-09 01:20

I\'m trying to get a list of Cities by sending the State name through Ajax in my SpringMVC 3.0 project. For the purpose, I\'ve used the following call (using jQuery) in my JSP:

5条回答
  •  一整个雨季
    2021-02-09 01:53

    You have incorrect response content type it supposed to be application/json.

    You need to add jackson to your /lib directory.

    and you should have

     
    

    In your serlvet-name.xml file.

    In addition I recommend you to map your request as get and try to browse it with Google Chrome,to see if it returns correct result. It has very good json representation.

提交回复
热议问题