Getting error “java.io.IOException: Server returned HTTP response code: 406”, when calling servlet
posted 2 years ago
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....