You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Ian Marshall <Ia...@GMail.com> on 2012/04/27 18:05:58 UTC

RE: Favicon best practice

Thanks Jeffrey,

I put my favicon.ico where you suggested and made this my sole favicon file.
I did keep

  <link rel="shortcut icon" type="image/x-icon" href="favicon.ico"/>

in the HTML of my base page in the hope that Microsoft will make Internet
Explorer 8 or above able to read the favicon in the future.

Mozilla Firefox 12.0 reads this fine. I see that IE8 may require an href
starting "http://www." for it to show the favicon. If so, to this
requirement I shall not bow.



Jeffrey Schneller wrote
> 
> I just put the favicon.ico at the root of the WebContent directory and
> don't specify anything in the HTML.  I believe browsers look in the root
> unless specified differently in the html (like you are doing).
> 
> BTW... app is on Apache + Tomcat and runs as the root app of the tomcat
> instance.
> 
> 
> 
> -----Original Message-----
> From: Ian Marshall [mailto:IanMarshall.UK@] 
> Sent: Friday, March 30, 2012 4:14 PM
> To: users@.apache
> Subject: Re: Favicon best practice
> 
> With Wicket 1.5.5, I have tried:
> 
> In the HTML of my base page I have:
> 
>   <link rel="shortcut icon" type="image/x-icon" href="favicon.ico"/>
> 
> and in my WebApplication-descended application class, I have:
> 
>   @Override
>   protected void init()
>   {
>     super.init();
>     ...
>     PackageResourceReference prrFavicon = new PackageResourceReference(
>      ResourcesLocator.class, "favicon.ico");
>     mountResource("favicon.ico", prrFavicon);
>   }
> 
> Sadly, the favicon shown remains that stored in web/favicon.ico, not the
> favicon.ico file stored in the same folder as my ResourcesLocator class.
> 
> Oh well, I shall just live with the favicon in my web folder, and leave
> the other one in place "just in case".
> 
> 
> Ian Marshall wrote
>> 
>> Alas I am getting MidasTouchCodingExceptions.
>> 
>> I tried
>> 
>>   protected void init()
>>   {
>>     super.init();
>>     ...
>> 
>>     // New code
>>     ResourceReference rrefFavicon = new ResourceReference(
>>      ResourcesLocator.class, "favicon.ico");
>>     IMountableRequestTargetUrlCodingStrategy mrtURLCodingStrategy =
>>      new SharedResourceRequestTargetUrlCodingStrategy("favicon.ico",
>>      rrefFavicon.getSharedResourceKey());
>> 
>>     // One of:
>>     mount(mrtURLCodingStrategy);
>>     mountSharedResource("favicon.ico",
>> mrtURLCodingStrategy.getMountPath());
>>   }
>> 
>> with
>> 
>>   <link rel="shortcut icon" href="[/]favicon.ico" 
>> type="image/x-icon"/>
>> 
>> but to no avail.
>> 
>> I shall try your suggestion when 1.5 comes out, which I am looking 
>> forward to. Thank you again for your suggestions.
>> 
> 
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Favicon-best-practice-tp3386789p4520242.html
> Sent from the Users forum mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@.apache
> For additional commands, e-mail: users-help@.apache
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@.apache
> For additional commands, e-mail: users-help@.apache
> 

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Favicon-best-practice-tp3386789p4593097.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org