<%@ page import="java.io.*" errorPage="StreamError.jsp" %>
<%
String filename = request.getParameter("File");
String mime_type = request.getParameter("MIME type");
%>
<%
if((mime_type != null) && (mime_type.length() > 0)) {
response.setHeader("Content-Type", mime_type);
}
%>
<%
String line = null;
BufferedReader iread = new BufferedReader(new FileReader(filename));
while((line = iread.readLine()) != null) {
out.write(line);
}
iread.close();
%>
|