I have RestApplication class:
@ApplicationPath("/orcr")
public class RestApplication extends Application {
@Override
public Map<String, Object> getProperties() {
Map<String, Object> properties = new HashMap<>();
properties.put("jersey.config.server.disableMoxyJson", true);
properties.put("jersey.config.disableMoxyJson", true);
return properties;
}
And some resource:
@Slf4j
@Stateless
@Path("/unhold")
public class UnholdResource {
@GET
@Path("/test")
public Response test() {
return Response.ok("cool").build();
}
}
i deploy it on my local glassfish4. Some logs:
org.glassfish.jersey.servlet.init.JerseyServletContainerInitializer > Registering the Jersey servlet application, named lv.lpb.rest.RestApplication, at the servlet mapping /orcr/ *, with the Application class of the same name.
javax.enterprise.web > Loading application [orcr-unholder] at [/orcr-unholder-r75.6944126]
javax.enterprise.system.core > orcr-unholder was successfully deployed in 4,222 milliseconds.
But if i try ant of urls like:
localhost:8081/orcr-unholder/orcr/unhold/test
localhost:8081/orcr-unholder/orcr/unhold
localhost:8081/orcr-unholder/orcr
localhost:8081/orcr/unhold/test
localhost:8081/orcr/unhold
it`s always 404 Not Found
localhost:8081 - server is running
So, what can it be?
Solved
right url was: localhost:8081/orcr-unholder-r75.6944126/orcr/unhold/test