I just started JAX-RS (Jersey) for my RESTful web API. Tomcat runs normally but root url returns 404 again and root/api a blank page when accessed on my web browser.
The set-up was the same as my previous question. After the previous question was solved I successfully accessed the root url (http://localhost:8080/com.G8.ws) and http://localhost:8080/com.G8.ws/api/v1/status.
package com.G8.ws;
import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
@Path("/v1/status")
public class V1_status {
@GET
@Produces(MediaType.TEXT_HTML)
public String returnTitle(){
return "<p>RESTful Web API using JAX/RS</p>";
}
}
On the browser from the eclipse, http://localhost:8080/com.G8.ws/api is not even accessible through Tomcat ("The webpage cannot be found"), and all other two pages give 404 error.
What might be the reason? I did not change anything after I saved last time.