This class called by using base url + path and get resource using HTTP GET method its is specified by annotation @GET and it produce the Sting output as Plain Text output and @PATH define the class URInow your project directory structure look like this

Configure Jersey Servlet dispatcher

you need to register REST as servlet dispatcher in web.xml.Configure the following content in web.xmlweb.xml

This is servlet class available in jersey com.sun.jersey.spi.container.servlet.ServletContainer.The init param com.sun.jersey.config.property.packages is used to defines in which package jersey will look for the web service classes.This package point to your resource class package.URL pattern is part of your base URL.Now your web service is read to run.Your Web Service available at following url