Your code seems to be ok, so the problem most likely is that you have not defined the base url for your service. You need to tell JAX-RS (Jersey is the implementation in GlassFish) which url pattern it must intercept as your endpoint (base url).
One way of achieving this is using an Application Class which can be added to any package in the project (you could alternatively define the necessary in a web.xml file which I won't cover). The following is the code:
import javax.ws.rs.ApplicationPath;
import javax.ws.rs.core.Application;
@ApplicationPath("your-base-url")
public class ApplicationConfig extends Application {
}
You use the @ApplicationPath annotation to define your base url.
You can then access your service at http://127.0.0.1:8080/hello-rest/your-base-url/hello