You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by "Howard W. Smith, Jr." <sm...@gmail.com> on 2012/12/07 04:33:13 UTC

TomEE: added favicon.ico, and it's not showing

As per the answer to How to display a favicon for web app using
Tomcat?<http://stackoverflow.com/a/7040100/933054>,
I added the following in h:head of my index.xhtml, tested the web app, and
even did F5 key (refresh), and the favicon.ico is not showing in my browser
tab.

<link rel="shortcut icon" href="images/favicon.ico" />

Please advise.

Re: TomEE: added favicon.ico, and it's not showing

Posted by "Howard W. Smith, Jr." <sm...@gmail.com>.
Neale,

Guess what... my JSF web app really only references index.xhtml, and
index.xhtml has many ui:include src="#{bean.page}" to render dynamic
content. So, I should be good-to-go with the favicon.ico in the /web root
folder.

Ooops, just remembered, I need to add this HTML to my login page and
viewExpired page; they are also in /web root folder.

Thanks again.

Howard


On Thu, Dec 6, 2012 at 11:26 PM, Neale <ne...@metawerx.net> wrote:

> Hi Howard,
>
> It's an HTML issue rather than a TomEE/Tomcat issue - so not really
> appropriate for this list, but glad you have it working.
>
> As with any link, /favicon.ico will go to your root, favicon.ico will be
> relative to the page using it (ie: you'll need the icon in every folder) or
> use http://site/favicon.ico for an absolute reference.  Browsers like to
> cache it, so if you make a mistake you might need to flush caches and
> reload, or even flush and restart the browser.
>
>
> Best Regards,
> Neale
>
>
> ----- Original Message ----- From: "Howard W. Smith, Jr." <
> smithh032772@gmail.com>
> To: <us...@openejb.apache.org>
> Sent: Friday, December 07, 2012 3:18 PM
> Subject: Re: TomEE: added favicon.ico, and it's not showing
>
>
>
>  Correction, I had to omit the "/" (forward slash); below, is the code i
>> added...
>>
>> <link rel="icon" type="image/png" href="favicon.ico"/>
>>
>>
>>
>> On Thu, Dec 6, 2012 at 11:17 PM, Howard W. Smith, Jr. <
>> smithh032772@gmail.com> wrote:
>>
>>  First, I tried what the website recommended, and that didn't work.
>>>
>>> Next/finally, I tried the code (below) that you recommended, and that
>>> worked without me having to press F5 key in Google Chrome.
>>>
>>> <link type="image/png" rel="icon" href="/favicon.ico" />
>>>
>>> Thanks a lot Neale!!!
>>>
>>>
>>> On Thu, Dec 6, 2012 at 11:06 PM, Howard W. Smith, Jr. <
>>> smithh032772@gmail.com> wrote:
>>>
>>>  Neale,
>>>>
>>>> Thank you for the response. I am trying the approach you recommend (the
>>>> code provided), but no success yet. Will keep hacking my way at it, and
>>>> let
>>>> you know if I have any more questions, or when it works.
>>>>
>>>> Howard
>>>>
>>>>
>>>> On Thu, Dec 6, 2012 at 10:40 PM, Neale <ne...@metawerx.net> wrote:
>>>>
>>>>  <link type="image/png" rel="icon" href="/favicon.ico" />
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>
>

Re: TomEE: added favicon.ico, and it's not showing

Posted by Neale <ne...@metawerx.net>.
Hi Howard,

It's an HTML issue rather than a TomEE/Tomcat issue - so not really 
appropriate for this list, but glad you have it working.

As with any link, /favicon.ico will go to your root, favicon.ico will be 
relative to the page using it (ie: you'll need the icon in every folder) or 
use http://site/favicon.ico for an absolute reference.  Browsers like to 
cache it, so if you make a mistake you might need to flush caches and 
reload, or even flush and restart the browser.

Best Regards,
Neale


----- Original Message ----- 
From: "Howard W. Smith, Jr." <sm...@gmail.com>
To: <us...@openejb.apache.org>
Sent: Friday, December 07, 2012 3:18 PM
Subject: Re: TomEE: added favicon.ico, and it's not showing


> Correction, I had to omit the "/" (forward slash); below, is the code i
> added...
>
> <link rel="icon" type="image/png" href="favicon.ico"/>
>
>
>
> On Thu, Dec 6, 2012 at 11:17 PM, Howard W. Smith, Jr. <
> smithh032772@gmail.com> wrote:
>
>> First, I tried what the website recommended, and that didn't work.
>>
>> Next/finally, I tried the code (below) that you recommended, and that
>> worked without me having to press F5 key in Google Chrome.
>>
>> <link type="image/png" rel="icon" href="/favicon.ico" />
>>
>> Thanks a lot Neale!!!
>>
>>
>> On Thu, Dec 6, 2012 at 11:06 PM, Howard W. Smith, Jr. <
>> smithh032772@gmail.com> wrote:
>>
>>> Neale,
>>>
>>> Thank you for the response. I am trying the approach you recommend (the
>>> code provided), but no success yet. Will keep hacking my way at it, and 
>>> let
>>> you know if I have any more questions, or when it works.
>>>
>>> Howard
>>>
>>>
>>> On Thu, Dec 6, 2012 at 10:40 PM, Neale <ne...@metawerx.net> wrote:
>>>
>>>> <link type="image/png" rel="icon" href="/favicon.ico" />
>>>
>>>
>>>
>>
> 


Re: TomEE: added favicon.ico, and it's not showing

Posted by "Howard W. Smith, Jr." <sm...@gmail.com>.
Correction, I had to omit the "/" (forward slash); below, is the code i
added...

<link rel="icon" type="image/png" href="favicon.ico"/>



On Thu, Dec 6, 2012 at 11:17 PM, Howard W. Smith, Jr. <
smithh032772@gmail.com> wrote:

> First, I tried what the website recommended, and that didn't work.
>
> Next/finally, I tried the code (below) that you recommended, and that
> worked without me having to press F5 key in Google Chrome.
>
> <link type="image/png" rel="icon" href="/favicon.ico" />
>
> Thanks a lot Neale!!!
>
>
> On Thu, Dec 6, 2012 at 11:06 PM, Howard W. Smith, Jr. <
> smithh032772@gmail.com> wrote:
>
>> Neale,
>>
>> Thank you for the response. I am trying the approach you recommend (the
>> code provided), but no success yet. Will keep hacking my way at it, and let
>> you know if I have any more questions, or when it works.
>>
>> Howard
>>
>>
>> On Thu, Dec 6, 2012 at 10:40 PM, Neale <ne...@metawerx.net> wrote:
>>
>>> <link type="image/png" rel="icon" href="/favicon.ico" />
>>
>>
>>
>

Re: TomEE: added favicon.ico, and it's not showing

Posted by "Howard W. Smith, Jr." <sm...@gmail.com>.
First, I tried what the website recommended, and that didn't work.

Next/finally, I tried the code (below) that you recommended, and that
worked without me having to press F5 key in Google Chrome.

<link type="image/png" rel="icon" href="/favicon.ico" />

Thanks a lot Neale!!!


On Thu, Dec 6, 2012 at 11:06 PM, Howard W. Smith, Jr. <
smithh032772@gmail.com> wrote:

> Neale,
>
> Thank you for the response. I am trying the approach you recommend (the
> code provided), but no success yet. Will keep hacking my way at it, and let
> you know if I have any more questions, or when it works.
>
> Howard
>
>
> On Thu, Dec 6, 2012 at 10:40 PM, Neale <ne...@metawerx.net> wrote:
>
>> <link type="image/png" rel="icon" href="/favicon.ico" />
>
>
>

Re: TomEE: added favicon.ico, and it's not showing

Posted by "Howard W. Smith, Jr." <sm...@gmail.com>.
Neale,

Thank you for the response. I am trying the approach you recommend (the
code provided), but no success yet. Will keep hacking my way at it, and let
you know if I have any more questions, or when it works.

Howard


On Thu, Dec 6, 2012 at 10:40 PM, Neale <ne...@metawerx.net> wrote:

> <link type="image/png" rel="icon" href="/favicon.ico" />

Re: TomEE: added favicon.ico, and it's not showing

Posted by Neale <ne...@metawerx.net>.
Hi Howard,

Try here:
http://wiki.metawerx.net/wiki/Web.xml.MimeMapping

In the section "Enabling a Favourites Icon" the various methods are covered 
as well as hints for making the icon image.

These days we use the image/png method on our sites:
<link type="image/png" rel="icon" href="/favicon.ico" />

Best Regards,
Neale

----- Original Message ----- 
From: "Howard W. Smith, Jr." <sm...@gmail.com>
To: <us...@openejb.apache.org>
Sent: Friday, December 07, 2012 2:33 PM
Subject: TomEE: added favicon.ico, and it's not showing


> As per the answer to How to display a favicon for web app using
> Tomcat?<http://stackoverflow.com/a/7040100/933054>,
> I added the following in h:head of my index.xhtml, tested the web app, and
> even did F5 key (refresh), and the favicon.ico is not showing in my 
> browser
> tab.
>
> <link rel="shortcut icon" href="images/favicon.ico" />
>
> Please advise.
>