Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Getting error “ Server returned HTTP response code: 406”, when calling servlet

misko mis
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am working on client-server application. I am getting error: " 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....
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic