M
Matt
I want to write a JSP page that allows to open/download a file
In fileview.jsp, I have the file browse, and when user click submit button,
fileview2.jsp should open the file. I am using response.sendRedirect(), but
I don't know if this is correct. It has the error:
Error 404: File not found: fileview/C:/app.log
fileview.jsp
============
<FORM ACTION="fileview2.jsp" method="POST">
<P><input type="FILE" name="filename">
<P><input type="submit">
fileview2.jsp
============
<%
String filename = request.getParameter("filename");
response.addHeader("content-type", "text/plain");
response.sendRedirect(filename);
%>
any ideas? please advise what I am missing. thanks!!
In fileview.jsp, I have the file browse, and when user click submit button,
fileview2.jsp should open the file. I am using response.sendRedirect(), but
I don't know if this is correct. It has the error:
Error 404: File not found: fileview/C:/app.log
fileview.jsp
============
<FORM ACTION="fileview2.jsp" method="POST">
<P><input type="FILE" name="filename">
<P><input type="submit">
fileview2.jsp
============
<%
String filename = request.getParameter("filename");
response.addHeader("content-type", "text/plain");
response.sendRedirect(filename);
%>
any ideas? please advise what I am missing. thanks!!