Personal I created a simple application to make a web service I did it as follows
netbeans file - > new project - > Maven (web application) I created a class called RestApplication
package br.com.teste.testeteste.rest;
import javax.ws.rs.ApplicationPath;
import javax.ws.rs.core.Application;
/**
*
* @author Rafael
*/
@ApplicationPath ("/resources")
public class RestApplication extends Application{
}
Then I created a Test.java class
package br.com.teste.testeteste;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
/**
*
* @author Rafael
*/
@Path ("/test")
public class Test {
@GET
@Produces (MediaType.TEXT_PLAIN)
public String primeiro(){
return"Meu primeiro WebService REST!";
}
}
When I run on glassfish, netbeans opens the browser and shows me link
My problem is that I want to run on tomcat When I squeeze in tomcat it does not open the browser for me and when I enter the address link I have 404 error
While in glassfish it is working.
Can anyone help me?
I do not know what's going on with my tomcat. when I do the manual deploy on it also I can not call the address that I have 404