Why would you?

FavIcon is meant as attributes of pages, more specifically pages of whole 
sites. 
You can potentially have different FavIcons for different parts of your web 
site, but that is not common. Resources, which PDF is, have no reason for 
"having a favourite icon". It would be the same as asking "can my GIFs have 
favicon". No, they cannot. Nor should they.

Nix.




________________________________
From: Dola Woolfe <dolac...@yahoo.com>
To: Tom Cat <tomcat-u...@jakarta.apache.org>
Sent: Tue, July 6, 2010 4:10:43 PM
Subject: favicon when serving non-html

Hi,

When I serve up, say, a PDF file, how do I control the favicon?

Here's my code:


   response.reset();
    response.setContentType(IOUtilities.gMIMEType(fn));
    response.setHeader("Content-disposition", "inline; filename=" + 
file.getName());
    OutputStream outStream = response.getOutputStream();
    synchronized(response.getOutputStream()){
      outStream.write(IOUtilities.gFile2Bytes(file.getAbsolutePath()));
    }
    response.flushBuffer();

Thanks in advance



      

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


      

Reply via email to