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 2011/03/18 11:20:28 UTC
Favicon best practice
I would appreciate some advice on best practice for favicons in Wicket....
I subclass most of my web pages from a subclass of WebPage. I implement my
favicon in the way set out at the foot of this posting. I have two types of
problem.
1. When testing the URL "http://localhost:8080/favicon.ico" on my local
machine (and a similar, production URL in deployment) I get the error like:
HTTP ERROR 404 Problem accessing /favicon.ico. Reason: NOT_FOUND
2. When accessing one of my pages descended from MyBasePage (itself
subclassed from WebPage and incorporating " ... " in its HTML mark-up), I
sometimes get the Google App Engine for Java warning:
org.apache.wicket.markup.html.PackageResource getResourceStream:
Unable to find package resource
[path = ..., style = null, locale = en_GB]
I suspect that I am doing something wrong. Can anyone point me in the right
direction? Any advice would be greatly appreciated.
HTML mark-up
------------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
...
...
Java code
---------
public class MyBasePage extends WebPage
{
...
public MyBasePage(IModel model)
{
super(model);
// Both the do-nothing "ResourcesLocator.java" file and my "favicon.ico"
// file are in the same resources package.
ResourceReference rrefFavicon = new ResourceReference(
ResourcesLocator.class, "favicon.ico");
ResourceLink rlnkFavicon =
new ResourceLink("lnkFavicon", rrefFavicon);
add(rlnkFavicon);
}
...
}
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Favicon-best-practice-tp3386779p3386779.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