I am trying to write a RESTFul Webservice using Jersey.
package sample.hello.resources;
@Path("/hello")
public class HelloResource {
@GET
@Produces({MediaType.TEXT_PLAIN})
public String sayHello() {
return "Hello Jersey";
}
}
My Eclipse give error for all the annotations – @Path, (Path cannot be resolved to a type)
Do I need to include any other libraries or configure the projects in Eclipse?
It seems that
Pathannotation exists injersey-corelibrary. I think you should include that library in your project