I am doing practice REST web service with Jersey 2.x. The code looks like this:
The context root is jerseyws.
@ApplicationPath("/services")
public class ShoppingApplication extends Application {
.....
}
@Path("/customers")
public class CustomerResource {
@GET
@Path("{id}")
@Produces("application/xml")
public StreamingOutput getCustomer(@PathParam("id") int id) {
....
}
...
}
and the URI is http://localhost:8080/jerseyws/services/customers/1 But, I received an 404 not found error. Please tell me where is the problem and thank you very much!
Aucun commentaire:
Enregistrer un commentaire