Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Spring
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Liutauras Vilda
Paul Clapham
Sheriffs:
paul wheaton
Tim Cooke
Henry Wong
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Piet Souris
Bartenders:
Mike London
Forum:
Spring
Controller response gets status 406
Mike Krichevsky
Greenhorn
Posts: 3
posted 9 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I have a jQuery function that finds user in database by login and prints the result. But i always get error: and can't figure out why. Any help please?
jQuery
function editUser(login) { $.ajax({ type: "post", url: "/edit", async: false, data: "login=" + login, dataType: "json", success: function (resp) { alert('Success'); }, error: function(resp) { alert('Fail'); } }) }
Controller
@RequestMapping(value="/edit", method=RequestMethod.POST) public @ResponseBody Wrapper edit(@RequestParam String login) { Wrapper wrapper1 = new Wrapper(); wrapper1 = wrapper.wrap(userService.findByLogin(login)); return wrapper1; }
Firebug
responseText The resource identified by this request is only capable of generating responses with characteristics not acceptable according to the request "accept" headers. status 406 statusText "Not Acceptable"
Mike Krichevsky
Greenhorn
Posts: 3
posted 9 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Sorry, problem is solved now.
Don't get me started about those stupid
light bulbs
.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
is it possible to use jquery post in Struts2
jQuery Ajax unable to read streamed html from a servlet.
help with jquery server responds with whole page
Replace current html page with ajax response
jQuery ajax request and 302 status code
More...