<%@ page info="Download reapplyDetermineEnrollmentProcessToVeteransIn8eAnd8g.error.log" %>

<%@ page  import="java.io.FileInputStream" %>
<%@ page  import="java.io.BufferedInputStream"  %>
<%@ page  import="java.io.File"  %>
<%@ page import="java.io.IOException" %>

<%@ page import="org.springframework.context.ApplicationContext" %>
<%@ page import="org.springframework.core.io.Resource" %>
<%@ page import="org.springframework.web.context.support.WebApplicationContextUtils" %>

<%
        ApplicationContext appContext = WebApplicationContextUtils
                .getWebApplicationContext(request.getSession()
                        .getServletContext());
        Resource resource = appContext
                .getResource("classpath:reProcessVeteransIn8eAnd8g.error.log");
       response.setContentType("application/unknown");
        response.addHeader("Content-Disposition", "attachment; filename="
                + resource.getFilename());
        response.setContentLength((int) resource.getFile().length());
        BufferedInputStream buf = new BufferedInputStream(resource
                .getInputStream());
        try {
            int readBytes = 0;
            while ((readBytes = buf.read()) != -1)
                out.write(readBytes);
        } finally {
            buf.close();
        }
%>
