Loading
 
What's Next: View All Tutorial →

HTTP Status 406 - Spring MVC + JSON

In this article, you will learn how to fix the HTTP Status 406 issue Issue:   HTTP Status 406 - type Status report message description The resource identified by this request is only capable of generating responses with character...

Published Date: 15/02/2015  Last Modified Date: 15/02/2015    New Post



In this article, you will learn how to fix the HTTP Status 406 issue

Issue:
 
HTTP Status 406 -

type Status report

message

description The resource identified by this request is only capable of generating responses with characteristics not acceptable according to the request "accept" headers.
Apache Tomcat/8.0.3

Solutions:

Add the following dependency
 
    <dependency>
            <groupId>org.codehaus.jackson</groupId>
            <artifactId>jackson-mapper-asl</artifactId>
            <version>1.9.13</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
            <version>2.5.1</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>2.5.1</version>
        </dependency>
        

If Spring MVC Test case required more json plugin, Avoid adding scope test to these dependency


 
Awaiting for Administrator approval





Tags: Issue and Solutions Spring MVC

← Back to list


Related Post




×