RE: Favicon best practice

2012-04-27 Thread Ian Marshall
Thanks Jeffrey,

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

  

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:
> 
>   
> 
> 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
>> 
>>   > 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-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: Favicon best practice

2012-03-30 Thread Jeffrey Schneller
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...@gmail.com] 
Sent: Friday, March 30, 2012 4:14 PM
To: users@wicket.apache.org
Subject: Re: Favicon best practice

With Wicket 1.5.5, I have tried:

In the HTML of my base page I have:

  

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
> 
>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-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org


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



Re: Favicon best practice

2012-03-30 Thread Ian Marshall
With Wicket 1.5.5, I have tried:

In the HTML of my base page I have:

  

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
> 
>   
> 
> 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-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Favicon best practice

2011-03-18 Thread Ian Marshall
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

  

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-tp3386789p3387829.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Favicon best practice

2011-03-18 Thread Martin Grigorov
mountSharedResource() will make it reachable at
/resources/org.apache.wicket.Application/favicon.ico

In Wicket 1.5 you can use mountResource("favicon.ico", resourceReference)
and it will do what you need.
You can write your custom IMountableRequestTargetUrlCodingStrategy to do
that in 1.4

On Fri, Mar 18, 2011 at 4:58 PM, Ian Marshall wrote:

> MOUNTING
> 
> In my WebApplication-descended class I tried
>
>  protected void init()
>  {
>super.init();
>...
>
>// New code
> ResourceReference rrefFavicon = new ResourceReference(
> ResourcesLocator.class, "favicon.ico");
> mountSharedResource([path], rrefFavicon.getSharedResourceKey());
>  }
>
> where for [path] I tried "favicon.ico", "/favicon.ico" and "/favicon.ico/"
> but not "/" since that is reserved for the home page, with HTML mark-up
>
>
>
> but this did not work for me.
>
>
> PUTTING NEXT TO /WEB-INF
> 
> Thanks for this tip; it worked for me!
>
>
> CONCLUSION
> --
> Thank you, Martin, for your response. This should have fixed my problem. My
> solution is not the neatest one, since I now have two favicon.ico files in
> my deployment, but the main thing is that it works.
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Favicon-best-practice-tp3386789p3387600.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com 


Re: Favicon best practice

2011-03-18 Thread Ian Marshall
MOUNTING

In my WebApplication-descended class I tried

  protected void init()
  {
super.init();
...

// New code
ResourceReference rrefFavicon = new ResourceReference(
 ResourcesLocator.class, "favicon.ico");
mountSharedResource([path], rrefFavicon.getSharedResourceKey());
  }

where for [path] I tried "favicon.ico", "/favicon.ico" and "/favicon.ico/"
but not "/" since that is reserved for the home page, with HTML mark-up

  

but this did not work for me.


PUTTING NEXT TO /WEB-INF

Thanks for this tip; it worked for me!


CONCLUSION
--
Thank you, Martin, for your response. This should have fixed my problem. My
solution is not the neatest one, since I now have two favicon.ico files in
my deployment, but the main thing is that it works.

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

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



Re: Favicon best practice

2011-03-18 Thread Martin Grigorov
Why not just put it next to WEB-INF/ ?
Or if you need to manipulate it with Wicket (e.g. generate it on the fly)
then use a Wicket Resource which is mounted at /favicon.ico.

On Fri, Mar 18, 2011 at 11:20 AM, Ian Marshall wrote:

> 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
> 
> 
>  "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-tp3386789p3386789.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com