When I try to download a file thru jsp, in (Internet Explorer 5.0)
the open dialog box appears TWICE.
1. You have chosen to download file from this location ... "download.jsp from <server>'
2. You have chosen to download file from this location... "file.txt"
Any reason why this happens?
It works fine with Netscape 4.0
I have HREF pointing to the download.jsp in the calling jsp.

Here is the code snippet for download.jsp:
<%
...
response.setContentType("text/plain");
response.setHeader("Content-Disposition","attachment;filename=file.txt;");
InputStream is = null;
//... Read InputStream from Database
OutputStream os = response.getOutputStream();
if (os != null)
{
   int c;
   while ( (c = is.read()) != -1)
   {
      os.write(c);
   }
   os.flush();
   os.close();
}
is.close();
...
%>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to