title: 415 Unsupported Media Type in tomcat
body: <p>I have created a web service if I execute this service from eclipse configured tomcat, then it works properly<br>
  But if I execute this service without eclipse tomcat(same tomcat but without eclipse) it says <strong>415 Unsupported Media Type</strong>
  <br>
  Here is my code</p>
  
  <pre><code>@Path("{get}")
  public class MyClass {
      @POST
      @Path("/token")
      @Produces(MediaType.APPLICATION_JSON)
      public Response getToken(@FormParam("username") String username, @FormParam("password") String password, @FormParam("identity") String identity){
          System.out.println("Service called !!!");
          if(username == null)
              return Response.status(404).entity("username can not be null").build(); 
          if(username != null &amp;&amp; username.length() == 0)
              return Response.status(404).entity("username can not be empty").build();    
  
          if(password == null)
              return Response.status(404).entity("password can not be null").build(); 
          if(password != null &amp;&amp; password.length() == 0)
              return Response.status(404).entity("password can not be empty").build();    
  
          if(identity == null)
              return Response.status(404).entity("identity can not be null").build(); 
          if(identity != null &amp;&amp; identity.length() == 0)
              return Response.status(404).entity("identity can not be empty").build();    
  
          OtherClass obj  =   new OtherClass();
  
          return Response.status(200)
                  .entity(obj.getdata(username, password, identity))
                  .build();
      }
  </code></pre>
  
  <p>web.xml is <br></p>
  
  <pre><code>    &lt;!DOCTYPE web-app PUBLIC
   "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
   "http://java.sun.com/dtd/web-app_2_3.dtd" &gt;
  
  &lt;web-app&gt;
    &lt;display-name&gt;Web Service&lt;/display-name&gt;
    &lt;servlet&gt;
          &lt;servlet-name&gt;jersey-serlvet&lt;/servlet-name&gt;
          &lt;servlet-class&gt;com.sun.jersey.spi.container.servlet.ServletContainer&lt;/servlet-class&gt;
          &lt;init-param&gt;
              &lt;param-name&gt;com.sun.jersey.api.json.POJOMappingFeature&lt;/param-name&gt;
              &lt;param-value&gt;true&lt;/param-value&gt;
          &lt;/init-param&gt;
          &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
      &lt;/servlet&gt;
  
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;jersey-serlvet&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/service/*&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>Service is called from Advance Rest Client by chrome <br>
  Content-type in request is </p>
  
  <blockquote>
    <p>text/html</p>
  </blockquote>