raw.jsp revision 1281
1422N/ASee LICENSE.txt included in this distribution for the specific
1422N/Afile and include the License file at LICENSE.txt.
include file="pageconfig.jspf"
/* ---------------------- raw.jsp start --------------------- */
cfg = PageConfig.get(request);
String redir = cfg.canProcess();
if (redir == null || redir.length() > 0) {
response.sendRedirect(redir);
File f = cfg.getResourceFile();
String revision = cfg.getRequestedRevision();
if (revision.length() == 0) {
long flast = cfg.getLastModified();
if (request.getDateHeader("If-Modified-Since") >= flast) {
String mimeType = getServletContext().getMimeType(f.getAbsolutePath());
response.setContentType(mimeType);
response.setHeader("content-disposition", "attachment; filename="
+ f.getName());
OutputStream o = response.getOutputStream();
while ((nr = in.read(buffer)) > 0) {
o.write(buffer, 0, nr);
o.flush();
o.close();
in.close();
/* ---------------------- raw.jsp end-------------------- */