How do i add static html resources to Grizzly 2.2 server? I tried
val server = GrizzlyHttpServerFactory.createHttpServer(uri, new ResourceConfig())
val statichandler = new StaticHttpHandler()
statichandler.addDocRoot("/webapp")
statichandler.start
server.getServerConfiguration.addHttpHandler(statichandler)
server.start
webapp folder is inside src/main/resource in a maven project.
Try:
Where
<path>is the absolute path to the resources you wish to serve.