File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Getting error “java.io.IOException: Server returned HTTP response code: 406”, when calling servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Getting error “java.io.IOException: Server returned HTTP response code: 406”, when calling servlet " Watch "Getting error “java.io.IOException: Server returned HTTP response code: 406”, when calling servlet " New topic
Author

Getting error “java.io.IOException: Server returned HTTP response code: 406”, when calling servlet

misko mis
Greenhorn

Joined: Jul 08, 2013
Posts: 1
I am working on client-server application. I am getting error: "java.io.IOException: Server returned HTTP response code: 406" when requesting method from servlet, to get object with selected name. On my server side I got following code in my DataController:



part of source code of my client where I am calling method getHarnessType:



after proceeding last line I am getting already mentioned error... interesting is, that when i change return type of method getHarnessType to String like:



and pass only String value to client (not whole object), everything works fine

full stack trace:




i tried to add and i get this message: ...The resource identified by this request is only capable of generating responses with characteristics not acceptable according to the request "accept" headers....
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Getting error “java.io.IOException: Server returned HTTP response code: 406”, when calling servlet