tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nikola Milutinovic <alok...@yahoo.com>
Subject Re: favicon when serving non-html
Date Wed, 07 Jul 2010 08:49:40 GMT
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 <dolachin@yahoo.com>
To: Tom Cat <tomcat-user@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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


      
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message