title: Why I am not getting updated response in jersey 2 even after restarting tomcat server?
body: <p>I am just starting up with rest web services and using jersey to create one.</p>
  <p>This is probably a lame question but kindly help as I am stuck. I have written a simple HelloWorld.java as given below.  This issue is I am updating the response string to &quot;New Response&quot; but it is keep showing the &quot;Old Response&quot; string value in browser. I have restarted the tomcat server after updating the string but keep getting the older response.</p>
  <p>Not sure why it is not getting updated.</p>
  <p><strong>HelloWorld.java</strong></p>
  <pre><code>package com.test;
  
  import javax.ws.rs.GET;
  import javax.ws.rs.Path;
  import javax.ws.rs.Produces;
  import javax.ws.rs.core.MediaType;
  
  
  @Path(&quot;/hello&quot;)
  public class HelloWorld
  {
    @GET
    @Produces(MediaType.TEXT_HTML)
    public String sayHelloXML()
    {
      String resource = &quot;&lt;h3&gt; Old response&lt;/h3&gt; &quot;;
      return resource;
      
    }
  
    @GET
    @Produces(MediaType.APPLICATION_JSON)
    public String sayHelloJSONEX()
    {
      String resource = null;
      return resource;
      
    }
  }
  </code></pre>
  <p><strong>web.xml</strong></p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
   &lt;web-app xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; 
  xmlns=&quot;http://xmlns.jcp.org/xml/ns/javaee&quot; 
   xsi:schemaLocation=&quot;http://xmlns.jcp.org/xml/ns/javaee 
   http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd&quot; id=&quot;WebApp_ID&quot; version=&quot;3.1&quot;&gt;
    &lt;display-name&gt;JerseyDemoWork&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;JerseyDemoWork&lt;/servlet-name&gt;
      &lt;servlet-class&gt;org.glassfish.jersey.servlet.ServletContainer&lt;/servlet-class&gt;
      &lt;init-param&gt;
          &lt;param-name&gt;jersey.config.server.provider.packages&lt;/param-name&gt;
          &lt;param-value&gt;com.test&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;JerseyDemoWork&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/rest/*&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  &lt;/web-app&gt;
  </code></pre>