I\'m attempting to make use of JAX-RS\' (Jersey) MVC pattern. Attempts to reach http://localhost:8080/myproject/foos/test result in an error that reads:
jav
Made the following changes:
web.xml:
30
welcome.jsp
jersey
com.sun.jersey.spi.container.servlet.ServletContainer
com.sun.jersey.config.property.packages
controllers
com.sun.jersey.config.property.WebPageContentRegex
/((WEB-INF/views))/.*
com.sun.jersey.config.property.JSPTemplatesBasePath
/WEB-INF/views/
com.sun.jersey.config.feature.Redirect
true
com.sun.jersey.config.feature.FilterForwardOn404
true
jersey
/*
Resource:
@Path("foos")
public class FooResource {
@GET
@Produces(MediaType.TEXT_HTML)
public Viewable index() {
return new Viewable("/foos/index", this);
}
@GET
@Path("{id}")
@Produces(MediaType.TEXT_HTML)
public Viewable view(@PathParam("id") String id) {
return new Viewable("/foos/view", id);
}
}
Views: