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: [email protected]
For additional commands, e-mail: [email protected]