code: public static HttpResponse staticResource(final URL resource, final long expiration) {
          return new HttpResponse() {
              public void generateResponse(StaplerRequest req, StaplerResponse rsp, Object node) throws IOException, ServletException {
                  rsp.serveFile(req,resource,expiration);
              }
          };
      }
docs: Serves a static resource specified by the URL.
  
  @param resource
  The static resource to be served.
  @param expiration
  The number of milliseconds until the resource will "expire".
  Until it expires the browser will be allowed to cache it
  and serve it without checking back with the server.
  After it expires, the client will send conditional GET to
  check if the resource is actually modified or not.
  If 0, it will immediately expire.