final String baseUri = "http://localhost:9998/"; final Map
initParams = new HashMap (); initParams.put("com.sun.jersey.config.property.packages", "my.jersey.Service"); System.out.println("Starting grizzly..."); SelectorThread threadSelector = GrizzlyWebContainerFactory.create(baseUri, initParams); System.out.println(String.format( "Jersey app started with WADL available at %sapplication.wadl\n" + "Try out %shelloworld\nHit enter to stop it...", baseUri, baseUri)); System.in.read(); threadSelector.stopEndpoint(); System.exit(0);
I probably should have commented before posting my answer but the question needs a bit of clarification: - Do you still want to use servlet filters to protect your resources? - What is mean by "configure it to use JaaS"? Are you thinking there should be some config that simply causes grizzly to protect your resources? - JaaS itself is only a framework and you have to plug some authentication "realm" or source (implemented with a LoginModule). - I don't see the need for the usage of cookies with a RESTful resource (assuming that is what you want to use jersey for).