Hello,

  The JSP script that follows produces an error
when accessing with Internet Explorer:

<%@ page contentType="application/pdf" %>
<%@ page import="java.io.File" %>
<%@ page import="java.io.FileInputStream" %>
<%@ page import="java.io.InputStreamReader" %>
<%

    InputStreamReader in = new InputStreamReader(
      new FileInputStream(new File("document.pdf")), "ISO-8859-1");
    char[] b = new char[128];
    int i = in.read(b, 0, 128);
    while (i >= 0) {
      out.write(b, 0, i);
      i = in.read(b, 0, 128);
    }
    in.close();

%>

More info:

* Tomcat version: 5.5.26.
* Internet Explorer open a download window, and then
  the error "No puede descargar xxxxxx de www.xxxx.es.
  El archivo no pudo ser escrito en la caché" (my
  IE is localized in spanish).
* The same script runs OK with Firefox in Linux and
  with Mozilla in Windows.
* The same script runs OK with Internet Explorer and
  Tomcat 5.0.19 + Apache 2.0.49.
* No messages in log.
* In the conf/web.xml file appears the mime-type
  "application/pdf".

regards,

  Luis

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to