title: 404 Error for a Jersey Tomcat web server created in eclipse with java
body: <p>I created a server starting from a dynamic web project. When I make a request to it by typing </p>
  
  <pre><code>http://localhost:8080/restserver/myserver
  </code></pre>
  
  <p>or </p>
  
  <pre><code>http://localhost:8080/restserver/myserver/myserver
  </code></pre>
  
  <p>into the search bar of my web browser I receive the response </p>
  
  <pre><code>HTTP Status 404 – Not Found
  
  Type Status Report
  
  Message /restserver/src/demo/demo
  
  Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
  Apache Tomcat/9.0.13
  </code></pre>
  
  <p>I don't know what I need to change with my server program. I've been following <a href="https://crunchify.com/how-to-build-restful-service-with-java-using-jax-rs-and-jersey/" rel="nofollow noreferrer">this tutorial</a> to set my server up, and it doesn't look like they have much more than me.</p>
  
  <p>My expected response to my request is</p>
  
  <p><a href="https://i.stack.imgur.com/wgsmo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wgsmo.png" alt="enter image description here"></a></p>
  
  <p>I've tried just about everything. Deleting and reinstalling eclipse and tomcat, removing my ~/.m2/repository folder. The log file looks basically <a href="https://coderanch.com/t/689802/application-servers/stop-memory-leak-Tomcat-Eclipse" rel="nofollow noreferrer">like this</a>,</p>
  
  <pre><code>127.0.0.1 - - [02/Dec/2018:13:09:20 -0600] "GET / HTTP/1.1" 404 1074
  0:0:0:0:0:0:0:1 - - [02/Dec/2018:13:11:13 -0600] "GET /RestServer HTTP/1.1" 302 -
  0:0:0:0:0:0:0:1 - - [02/Dec/2018:13:11:13 -0600] "GET /RestServer/ HTTP/1.1" 404 1089
  0:0:0:0:0:0:0:1 - - [02/Dec/2018:13:11:14 -0600] "GET /favicon.ico HTTP/1.1" 404 1085
  0:0:0:0:0:0:0:1 - - [02/Dec/2018:13:11:19 -0600] "GET /RestServer/myserver HTTP/1.1" 404 1097
  0:0:0:0:0:0:0:1 - - [02/Dec/2018:13:11:19 -0600] "GET /favicon.ico HTTP/1.1" 404 1085
  0:0:0:0:0:0:0:1 - - [02/Dec/2018:13:11:24 -0600] "GET /RestServer/myserver/myserver HTTP/1.1" 404 1110
  0:0:0:0:0:0:0:1 - - [02/Dec/2018:13:11:24 -0600] "GET /favicon.ico HTTP/1.1" 404 1085
  </code></pre>
  
  <p>(I have know idea where the 302 cam from, just saw this)</p>
  
  <p>so I'm thinking it might be that the requests aren't being authenticated because of the - in the third column? I also don't understand the <a href="https://community.alfresco.com/docs/DOC-5374-install-tomcat6" rel="nofollow noreferrer">catalina.properties file</a>, but I followed those instructions and it didn't help. I also read a few things about proxies that I didn't really understand because I couldn't figure out how to disable proxies.</p>
  
  <hr>
  
  <h1>RestServer/pom.xml</h1>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
    &lt;groupId&gt;RestServer&lt;/groupId&gt;
    &lt;artifactId&gt;RestServer&lt;/artifactId&gt;
    &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
    &lt;packaging&gt;war&lt;/packaging&gt;
    &lt;build&gt;
      &lt;sourceDirectory&gt;src&lt;/sourceDirectory&gt;
      &lt;plugins&gt;
        &lt;plugin&gt;
          &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
          &lt;version&gt;3.8.0&lt;/version&gt;
          &lt;configuration&gt;
            &lt;source&gt;1.6&lt;/source&gt;
            &lt;target&gt;1.6&lt;/target&gt;
          &lt;/configuration&gt;
        &lt;/plugin&gt;
        &lt;plugin&gt;
          &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
          &lt;version&gt;3.2.1&lt;/version&gt;
          &lt;configuration&gt;
            &lt;warSourceDirectory&gt;WebContent&lt;/warSourceDirectory&gt;
          &lt;/configuration&gt;
        &lt;/plugin&gt;
      &lt;/plugins&gt;
    &lt;/build&gt;
    &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;asm&lt;/groupId&gt;
              &lt;artifactId&gt;asm&lt;/artifactId&gt;
              &lt;version&gt;3.3.1&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.sun.jersey&lt;/groupId&gt;
              &lt;artifactId&gt;jersey-bundle&lt;/artifactId&gt;
              &lt;version&gt;1.19.4&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.json&lt;/groupId&gt;
              &lt;artifactId&gt;json&lt;/artifactId&gt;
              &lt;version&gt;20170516&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.sun.jersey&lt;/groupId&gt;
              &lt;artifactId&gt;jersey-server&lt;/artifactId&gt;
              &lt;version&gt;1.19.4&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.sun.jersey&lt;/groupId&gt;
              &lt;artifactId&gt;jersey-core&lt;/artifactId&gt;
              &lt;version&gt;1.19.4&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>
  
  <hr>
  
  <p><strong>RestServer/WEB-INF/web.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0"&gt;
    &lt;display-name&gt;RestServer&lt;/display-name&gt;
    &lt;welcome-file-list&gt;
      &lt;welcome-file&gt;index.html&lt;/welcome-file&gt;
      &lt;welcome-file&gt;index.htm&lt;/welcome-file&gt;
      &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt;
      &lt;welcome-file&gt;default.html&lt;/welcome-file&gt;
      &lt;welcome-file&gt;default.htm&lt;/welcome-file&gt;
      &lt;welcome-file&gt;default.jsp&lt;/welcome-file&gt;
    &lt;/welcome-file-list&gt;
    &lt;servlet&gt;
      &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
      &lt;servlet-class&gt;javax.faces.webapp.FacesServlet&lt;/servlet-class&gt;
      &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
    &lt;/servlet&gt;
    &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/serv/*&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <hr>
  
  <h1>RestServer/Java Resources/src/serverPackage/MyServer.java</h1>
  
  <pre><code>package serverPackage;
  
  import javax.ws.rs.GET;
  import javax.ws.rs.Path;
  import javax.ws.rs.PathParam;
  import javax.ws.rs.Produces;
  
  @Path("/myserver")
  public class MyServer {
      @GET
      @Produces("application/xml")
      public String convertCtoF() {
  
          Double fahrenheit;
          Double celsius = 36.8;
          fahrenheit = ((celsius * 9) / 5) + 32;
  
          String result = "@Produces(\"application/xml\") Output: \n\nC to F Converter Output: \n\n" + fahrenheit;
          return "&lt;ctofservice&gt;" + "&lt;celsius&gt;" + celsius + "&lt;/celsius&gt;" + "&lt;ctofoutput&gt;" + result + "&lt;/ctofoutput&gt;" + "&lt;/ctofservice&gt;";
      }
  
      @Path("{c}")
      @GET
      @Produces("application/xml")
      public String convertCtoFfromInput(@PathParam("c") Double c) {
          Double fahrenheit;
          Double celsius = c;
          fahrenheit = ((celsius * 9) / 5) + 32;
  
          String result = "@Produces(\"application/xml\") Output: \n\nC to F Converter Output: \n\n" + fahrenheit;
          return "&lt;ctofservice&gt;" + "&lt;celsius&gt;" + celsius + "&lt;/celsius&gt;" + "&lt;ctofoutput&gt;" + result + "&lt;/ctofoutput&gt;" + "&lt;/ctofservice&gt;";
      }
  }
  </code></pre>
  
  <hr>
  
  <h1>My current file directory</h1>
  
  <p><a href="https://i.stack.imgur.com/E3G2W.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/E3G2W.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/3VSxR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3VSxR.png" alt="enter image description here"></a></p>
  
  <hr>
  
  <p><strong>Update</strong></p>
  
  <p>I changed </p>
  
  <pre><code>  &lt;servlet&gt;
      &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
      &lt;servlet-class&gt;javax.faces.webapp.FacesServlet&lt;/servlet-class&gt;
      &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
    &lt;/servlet&gt;
    &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/serv/*&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
  </code></pre>
  
  <p>to </p>
  
  <pre><code>&lt;servlet&gt;
      &lt;servlet-name&gt;Jersey Web Application&lt;/servlet-name&gt;
      &lt;servlet-class&gt;com.sun.jersey.spi.container.servlet.ServletContainer&lt;/servlet-class&gt;
      &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
  &lt;/servlet&gt;
  &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;Jersey Web Application&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/serv/*&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  </code></pre>
  
  <p>And now when I visit <a href="http://localhost:8080/RestServer/serv/myserver" rel="nofollow noreferrer">http://localhost:8080/RestServer/serv/myserver</a></p>
  
  <pre><code>I receive the error
  
  HTTP Status 500 – Internal Server Error
  Type Exception Report
  
  Message Servlet.init() for servlet [Jersey Web Application] threw exception
  
  Description The server encountered an unexpected condition that prevented it from fulfilling the request.
  
  Exception
  
  javax.servlet.ServletException: Servlet.init() for servlet [Jersey Web Application] threw exception
      org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
      org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
      org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668)
      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
      org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
      org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
      org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:791)
      org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1417)
      org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
      java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      java.base/java.lang.Thread.run(Thread.java:834)
  Root Cause
  
  java.lang.TypeNotPresentException: Type javax.xml.bind.JAXBContext not present
      java.base/sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:117)
      java.base/sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:125)
      java.base/sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49)
      java.base/sun.reflect.generics.visitor.Reifier.reifyTypeArguments(Reifier.java:68)
      java.base/sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:138)
      java.base/sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49)
      java.base/sun.reflect.generics.repository.ClassRepository.computeSuperInterfaces(ClassRepository.java:117)
      java.base/sun.reflect.generics.repository.ClassRepository.getSuperInterfaces(ClassRepository.java:95)
      java.base/java.lang.Class.getGenericInterfaces(Class.java:1138)
      com.sun.jersey.core.reflection.ReflectionHelper.getClass(ReflectionHelper.java:629)
      com.sun.jersey.core.reflection.ReflectionHelper.getClass(ReflectionHelper.java:625)
      com.sun.jersey.core.spi.factory.ContextResolverFactory.getParameterizedType(ContextResolverFactory.java:202)
      com.sun.jersey.core.spi.factory.ContextResolverFactory.init(ContextResolverFactory.java:89)
      com.sun.jersey.server.impl.application.WebApplicationImpl._initiate(WebApplicationImpl.java:1332)
      com.sun.jersey.server.impl.application.WebApplicationImpl.access$700(WebApplicationImpl.java:180)
      com.sun.jersey.server.impl.application.WebApplicationImpl$13.f(WebApplicationImpl.java:799)
      com.sun.jersey.server.impl.application.WebApplicationImpl$13.f(WebApplicationImpl.java:795)
      com.sun.jersey.spi.inject.Errors.processWithErrors(Errors.java:193)
      com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:795)
      com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:790)
      com.sun.jersey.spi.container.servlet.ServletContainer.initiate(ServletContainer.java:509)
      com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.initiate(ServletContainer.java:339)
      com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:605)
      com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:207)
      com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:394)
      com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:577)
      javax.servlet.GenericServlet.init(GenericServlet.java:158)
      org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
      org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
      org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668)
      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
      org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
      org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
      org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:791)
      org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1417)
      org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
      java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      java.base/java.lang.Thread.run(Thread.java:834)
  Root Cause
  
  java.lang.ClassNotFoundException: javax.xml.bind.JAXBContext
      org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1328)
      org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1157)
      java.base/java.lang.Class.forName0(Native Method)
      java.base/java.lang.Class.forName(Class.java:398)
      java.base/sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:114)
      java.base/sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:125)
      java.base/sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49)
      java.base/sun.reflect.generics.visitor.Reifier.reifyTypeArguments(Reifier.java:68)
      java.base/sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:138)
      java.base/sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49)
      java.base/sun.reflect.generics.repository.ClassRepository.computeSuperInterfaces(ClassRepository.java:117)
      java.base/sun.reflect.generics.repository.ClassRepository.getSuperInterfaces(ClassRepository.java:95)
      java.base/java.lang.Class.getGenericInterfaces(Class.java:1138)
      com.sun.jersey.core.reflection.ReflectionHelper.getClass(ReflectionHelper.java:629)
      com.sun.jersey.core.reflection.ReflectionHelper.getClass(ReflectionHelper.java:625)
      com.sun.jersey.core.spi.factory.ContextResolverFactory.getParameterizedType(ContextResolverFactory.java:202)
      com.sun.jersey.core.spi.factory.ContextResolverFactory.init(ContextResolverFactory.java:89)
      com.sun.jersey.server.impl.application.WebApplicationImpl._initiate(WebApplicationImpl.java:1332)
      com.sun.jersey.server.impl.application.WebApplicationImpl.access$700(WebApplicationImpl.java:180)
      com.sun.jersey.server.impl.application.WebApplicationImpl$13.f(WebApplicationImpl.java:799)
      com.sun.jersey.server.impl.application.WebApplicationImpl$13.f(WebApplicationImpl.java:795)
      com.sun.jersey.spi.inject.Errors.processWithErrors(Errors.java:193)
      com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:795)
      com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:790)
      com.sun.jersey.spi.container.servlet.ServletContainer.initiate(ServletContainer.java:509)
      com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.initiate(ServletContainer.java:339)
      com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:605)
      com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:207)
      com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:394)
      com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:577)
      javax.servlet.GenericServlet.init(GenericServlet.java:158)
      org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
      org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
      org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668)
      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
      org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
      org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
      org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:791)
      org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1417)
      org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
      java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      java.base/java.lang.Thread.run(Thread.java:834)
  Note The full stack trace of the root cause is available in the server logs.
  </code></pre>
  
  <p>Updated local_host_accesslog</p>
  
  <pre><code>127.0.0.1 - - [03/Dec/2018:01:34:47 -0600] "GET / HTTP/1.1" 404 1074
  0:0:0:0:0:0:0:1 - - [03/Dec/2018:01:39:55 -0600] "GET /myserver HTTP/1.1" 404 1082
  0:0:0:0:0:0:0:1 - - [03/Dec/2018:01:39:57 -0600] "GET /favicon.ico HTTP/1.1" 404 1085
  0:0:0:0:0:0:0:1 - - [03/Dec/2018:01:40:15 -0600] "GET /RestServer/myserver HTTP/1.1" 404 1097
  0:0:0:0:0:0:0:1 - - [03/Dec/2018:01:40:21 -0600] "GET /RestServer/serv/myserver HTTP/1.1" 500 10064
  </code></pre>
  
  <hr>
  
  <p><strong>Updated pom.xml</strong></p>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
    &lt;groupId&gt;RestServer&lt;/groupId&gt;
    &lt;artifactId&gt;RestServer&lt;/artifactId&gt;
    &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
    &lt;packaging&gt;war&lt;/packaging&gt;
    &lt;build&gt;
      &lt;sourceDirectory&gt;src&lt;/sourceDirectory&gt;
      &lt;plugins&gt;
        &lt;plugin&gt;
          &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
          &lt;version&gt;3.8.0&lt;/version&gt;
          &lt;configuration&gt;
            &lt;source&gt;1.6&lt;/source&gt;
            &lt;target&gt;1.6&lt;/target&gt;
          &lt;/configuration&gt;
        &lt;/plugin&gt;
        &lt;plugin&gt;
          &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
          &lt;version&gt;3.2.1&lt;/version&gt;
          &lt;configuration&gt;
            &lt;warSourceDirectory&gt;WebContent&lt;/warSourceDirectory&gt;
          &lt;/configuration&gt;
        &lt;/plugin&gt;
  
      &lt;/plugins&gt;
    &lt;/build&gt;
    &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;asm&lt;/groupId&gt;
              &lt;artifactId&gt;asm&lt;/artifactId&gt;
              &lt;version&gt;3.3.1&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.sun.jersey&lt;/groupId&gt;
              &lt;artifactId&gt;jersey-bundle&lt;/artifactId&gt;
              &lt;version&gt;1.19.4&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.json&lt;/groupId&gt;
              &lt;artifactId&gt;json&lt;/artifactId&gt;
              &lt;version&gt;20170516&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.sun.jersey&lt;/groupId&gt;
              &lt;artifactId&gt;jersey-server&lt;/artifactId&gt;
              &lt;version&gt;1.19.4&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.sun.jersey&lt;/groupId&gt;
              &lt;artifactId&gt;jersey-core&lt;/artifactId&gt;
              &lt;version&gt;1.19.4&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax.xml.bind&lt;/groupId&gt;
              &lt;artifactId&gt;jaxb-api&lt;/artifactId&gt;
              &lt;version&gt;2.2.6&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.googlecode.json-simple&lt;/groupId&gt;
              &lt;artifactId&gt;json-simple&lt;/artifactId&gt;
              &lt;version&gt;1.1&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-web&lt;/artifactId&gt;
              &lt;version&gt;3.0.4.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax.activation&lt;/groupId&gt;
              &lt;artifactId&gt;activation&lt;/artifactId&gt;
              &lt;version&gt;1.1.1&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>