title: Root resource classes found jersey rest
body: <p>I am trying to create a simple webservice using jersey rest webservices. So I created a simple class that i called main :</p>
  
  <pre><code>@Path("/main")
  public class main {
  @GET
  @Path (value="Stringtest")
  @Produces(MediaType.APPLICATION_JSON)
  public String Stringtest()
  {
  System.out.println("************");
  return ("string");
  }
  }
  </code></pre>
  
  <p>And then I chaged web.xml ( my package's name is "test")</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="ASCII"?&gt;
  &lt;web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"        xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0"&gt;
  &lt;display-name&gt;rest&lt;/display-name&gt;
  &lt;servlet&gt;
  &lt;description&gt;JAX-RS Tools Generated - Do not modify&lt;/description&gt;
  &lt;servlet-name&gt;JAX-RS Servlet&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;init-param&gt; 
  &lt;param-name&gt;com.sun.jersey.config.property.packages&lt;/param-name&gt; 
  &lt;param-value&gt;test&lt;/param-value&gt; 
  &lt;/init-param&gt;
  &lt;/servlet&gt;
  &lt;servlet-mapping&gt;
  &lt;servlet-name&gt;JAX-RS Servlet&lt;/servlet-name&gt;
  &lt;url-pattern&gt;/rest/*&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>it seems that there is something wrong in the web.xml because i get this error</p>
  
  <pre><code>Infos: Scanning for root resource and provider classes in the packages:
  test
  AM com.sun.jersey.api.core.ScanningResourceConfig logClasses
  Infos: Root resource classes found:
  class test.main
  com.sun.jersey.api.core.ScanningResourceConfig init
  Infos: No provider classes found.
  </code></pre>
  
  <p>Are there any suggestions to this issue? Please help!</p>