This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes JSF and the fly likes Favicon implementation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Favicon implementation" Watch "Favicon implementation" New topic
Author

Favicon implementation

jeff rusty
Ranch Hand

Joined: Nov 07, 2006
Posts: 109
Hi Rancher,

I want to implement Favicon in JSF trinidad and i couldnt find any tag that would help me to achieve this.
Incase of HTml the below code will work so i wanted to know whether is an equivalent way to achieve this in JSF
<link rel="icon" type="image/vnd.microsoft.icon" href="http://example.com/image.ico">

thanks in advance
Viswanath Tg
Greenhorn

Joined: Nov 27, 2007
Posts: 20
hi Jeff,

Check with the below snippet

<h:commandLink rel="" type="" value=""></h:commandLink>

Regards
Viswanath

Helping hands are better than praying lips
Rainer Eschen
author
Ranch Hand

Joined: Jan 24, 2009
Posts: 75
If your <link> tag works don't change it. It is valid HTML and doesn't need special treatment. Although, I'm not an active Trinidad guy I use it in ICEfaces like this. You may think about creating the icon path from the Faces Context instead.

BTW: The command link answer makes no sense because we don't talk about an action here.


ICEfaces book . ICEcube . ICEfusion . Scrum
Francisco Llaryora
Greenhorn

Joined: Dec 30, 2011
Posts: 13
Hi, to all. I'm using Jsf with Jboss, and i have the same problem.
I try (in head tag):
<link rel="Shortcut Icon" type="image/x-icon" href="/images/favicon-sun.ico" />
but doesn't work.

Thanks !
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15665
    
  15

Don't use JSF to do what JSF doesn't do.

To make favicon work, all you really need is a bog-standard "favicon.ico" file in the usual WAR location.

If you prefer to use the "link" HTML tag, use the "f:verbatim" element to wrap (escape) the link HTML tag and place the wrapped link in the usual location for such tags in the View definition. In other words, in the HEAD section.

Do NOT use h:commandLink (which generates a JSF postback, not a "link" element). Do NOT write some excessively-complex JSF-specific Java code.

Like so many things in JSF, the simplest solution is the one that works best.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Favicon implementation
 
Similar Threads
how to get favicon
favicon
Title Icon or Favicon?
favicon
Favicon creation