This feature is implemented in Grizzly 2.3.3+. Here is the correspondent question .
You can use the special CLStaticHttpHandler and pass the ClassLoader, which will be used to search for static resources. For instance:
httpServer.getServerConfiguration().addHttpHandler( new CLStaticHttpHandler(new URLClassLoader(new URL[] {new URL("file:///home/username/staticfiles.jar")})), "/www");
Hope this helps.
source share