/** * Serves the specified {@link URL} as a static resource. */ boolean serveStaticResource(HttpServletRequest req, StaplerResponse rsp, URL url, long expiration) throws IOException { return serveStaticResource(req,rsp,openURL(url),expiration); }
/** * Serves the specified {@link URLConnection} as a static resource. */ boolean serveStaticResource(HttpServletRequest req, StaplerResponse rsp, OpenConnection con, long expiration) throws IOException { if (con == null) { return false; } try { return serveStaticResource(req, rsp, con.stream, con.connection.getLastModified(), expiration, con.connection.getContentLength(), con.connection.getURL().toString()); } finally { con.close(); } }
public void serveFile(StaplerRequest req, InputStream data, long lastModified, long expiration, long contentLength, String fileName) throws ServletException, IOException { if(!stapler.serveStaticResource(req,this,data,lastModified,expiration,contentLength,fileName)) sendError(SC_NOT_FOUND); }
/** * Serves the specified {@link URL} as a static resource. */ boolean serveStaticResource(HttpServletRequest req, StaplerResponse rsp, URL url, long expiration) throws IOException { return serveStaticResource(req,rsp,openURL(url),expiration); }
/** * Serves the specified {@link URL} as a static resource. */ boolean serveStaticResource(HttpServletRequest req, StaplerResponse rsp, URL url, long expiration) throws IOException { return serveStaticResource(req,rsp,openURL(url),expiration); }
public void serveFile(StaplerRequest req, URL resource, long expiration) throws ServletException, IOException { if(!stapler.serveStaticResource(req,this,resource,expiration)) sendError(SC_NOT_FOUND); }
public void serveFile(StaplerRequest req, InputStream data, long lastModified, long expiration, long contentLength, String fileName) throws ServletException, IOException { if(!stapler.serveStaticResource(req,this,data,lastModified,expiration,contentLength,fileName)) sendError(SC_NOT_FOUND); }
public void forward(ServletRequest request, ServletResponse response) throws ServletException, IOException { stapler.serveStaticResource((HttpServletRequest)request, new ResponseImpl(stapler, (HttpServletResponse) response), res, 0); }
public void serveFile(StaplerRequest req, URL resource, long expiration) throws ServletException, IOException { if(!stapler.serveStaticResource(req,this,resource,expiration)) sendError(SC_NOT_FOUND); }
public void serveFile(StaplerRequest req, URL resource, long expiration) throws ServletException, IOException { if(!stapler.serveStaticResource(req,this,resource,expiration)) sendError(SC_NOT_FOUND); }
public void serveFile(StaplerRequest req, InputStream data, long lastModified, long expiration, long contentLength, String fileName) throws ServletException, IOException { if(!stapler.serveStaticResource(req,this,data,lastModified,expiration,contentLength,fileName)) sendError(SC_NOT_FOUND); }
public void generateResponse(StaplerRequest req, StaplerResponse rsp, Object node) throws IOException, ServletException { Stapler.getCurrent().serveStaticResource(req,rsp,resource,expiration); } };
public void forward(ServletRequest request, ServletResponse response) throws ServletException, IOException { stapler.serveStaticResource((HttpServletRequest)request, new ResponseImpl(stapler, (HttpServletResponse) response), res, 0); }
/** * Serves the specified {@link URLConnection} as a static resource. */ boolean serveStaticResource(HttpServletRequest req, StaplerResponse rsp, OpenConnection con, long expiration) throws IOException { if (con == null) return false; try { return serveStaticResource(req, rsp, con.stream, con.getLastModified(), expiration, con.connection.getContentLength(), con.connection.getURL().toString()); } finally { con.close(); } }
/** * Serves the specified {@link URLConnection} as a static resource. */ boolean serveStaticResource(HttpServletRequest req, StaplerResponse rsp, OpenConnection con, long expiration) throws IOException { if (con == null) return false; try { return serveStaticResource(req, rsp, con.stream, con.getLastModified(), expiration, con.connection.getContentLength(), con.connection.getURL().toString()); } finally { con.close(); } }
if(staticLink) expires*=365; // static resources are unique, so we can set a long expiration date if(serveStaticResource(req, new ResponseImpl(this, rsp), con, expires)) return; // done
if(staticLink) expires*=365; // static resources are unique, so we can set a long expiration date if(serveStaticResource(req, new ResponseImpl(this, rsp), con, expires)) return; // done
public void serveLocalizedFile(StaplerRequest request, URL res, long expiration) throws ServletException, IOException { if(!stapler.serveStaticResource(request, this, stapler.selectResourceByLocale(res,request.getLocale()), expiration)) sendError(SC_NOT_FOUND); }
public void serveLocalizedFile(StaplerRequest request, URL res, long expiration) throws ServletException, IOException { if(!stapler.serveStaticResource(request, this, stapler.selectResourceByLocale(res,request.getLocale()), expiration)) sendError(SC_NOT_FOUND); }
public void serveLocalizedFile(StaplerRequest request, URL res, long expiration) throws ServletException, IOException { if(!stapler.serveStaticResource(request, this, stapler.selectResourceByLocale(res,request.getLocale()), expiration)) sendError(SC_NOT_FOUND); }