I have a Jetty service that I run with Jetty programmatically. I have a Jetty class in the package package.of.my.jersey. I configure the server in the following way:
ServletContextHandler context = new ServletContextHandler();
context.setContextPath("/test");
Map<String, Object> initMap = new HashMap<String, Object>();
initMap.put("com.sun.jersey.api.json.POJOMappingFeature", "true");
initMap.put("com.sun.jersey.config.property.packages",
"package.of.my.jersey");
context.addServlet(new ServletHolder(new ServletContainer(
new PackagesResourceConfig(initMap))), "/newValue/*");
I run the service via "java -jar nameOfTheService.jar", and get the service works correctly for the methods that the Jersey class exposes.
I have also some HTML pages in the java/main/resources/package/of.my.jersey, and I want to access to them. The problem is that I havent find any way to access it. Is there anyway to allow other resources to run to be called via http in the same service?
Thank you in advance!