You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Nicolas Barrera <nb...@gmail.com> on 2011/04/08 15:08:54 UTC
How to setup favicon?
Hi,
I 've read on the internet about setting up favicon on a web site.
As I see it, it takes some easy steps to do it the cross-browser way:
- Add a 16x16 .ico file at the website root folder (I 've put it in
src/main/webapp/favicon.ico)
- Add the following html code inside the header tag:
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico">
>
>
What I 've faced trying to setup this using Tapestry 5.1.0.5... is that that
code I added inside my head tag (that link to favicon) is erased and
replaced by javascripts includes (other links) generated by tapestry.
How is the Tapestry web to add favicon to the website? just leaving the
favicon.ico in the web root? (doing just that is not working for me at
least)
cheers and thanks.
Nicolás.-
Re: How to setup favicon?
Posted by Nicolas Barrera <nb...@gmail.com>.
Well...,
Tapestry and favicon work great together..., just follow the steps described
before and
try not to get messed with pages that have different layouts as I did :S.
sorry for the noise in the list..,
and thanks for your responses.
Nicolás.-
Re: How to setup favicon?
Posted by Nicolas Barrera <nb...@gmail.com>.
Sorry about this one.., it was my bad..
ALSO I 'd like to say that even though I keep seeing the tomcat or jetty
> favicon... the favicon.ico file that is inside the generated war is the
> tapestry favicon, not mine...
>
I 'm still trying..., now with the way bryan shows
Nicolás.-
On Fri, Apr 8, 2011 at 12:01 PM, Bryan Lewis <jb...@gmail.com> wrote:
> I haven't had any trouble defining a favicon, and I run in Jetty both on my
> dev machine ond on our production server. I put the icon file in
> src/main/webapp/i. My layout component does:
>
> <head>
> <title>${title}</title>
> <link rel="icon" type="image/x-icon" href="${context:/i/filename.ico}"/>
> <link rel="shortcut icon" type="image/x-icon"
> href="${context:/i/filename.ico}"/>
> </head>
>
> (I forget why I needed both links and maybe I don't any more... some
> browser
> inconsistency.)
>
>
>
> On Fri, Apr 8, 2011 at 10:23 AM, Nicolas Barrera <nb...@gmail.com>
> wrote:
>
> > Hi!, thanks for both responses...
> >
> > Are you using a layout component?
> > >
> > >
> > yes I 'm...
> >
> > Are you running in Jetty?
> > >
> > >
> > yes also...
> >
> >
> > guys... 're you some kind of mentalist? ;)
> >
> > I 'll try it on tomcat... but I asked it right away because looking into
> > generated html I couldn't see the link to the .ico I 've added...
> >
> >
> > Anohter thing I 'm doing different is that I 'm not adding the
> favicon.ico
> > as a Tapestry asset, as Nicola does...
> >
> > <link href="${asset:context:/favicon.ico}" rel="shortcut icon" />
> > >
> >
> > will try that also...
> >
> > thanks, 'll be back with results
> >
> > Nicolás.-
> >
> >
> > On Fri, Apr 8, 2011 at 10:30 AM, Nicola Buso <nicola.buso@infocert.it
> > >wrote:
> >
> > > Are you running in Jetty? I notice it replace my favicon on localhost
> > > (mvn jetty:run); under tomcat my favicon is shown:
> > >
> > >
> > > on my layout component as usual:
> > >
> > > <link href="${asset:context:/favicon.ico}" rel="shortcut icon" />
> > >
> > >
> > > nicola.
> > >
> > >
> > > On 04/08/2011 03:11 PM, Thiago H. de Paula Figueiredo wrote:
> > > > On Fri, 08 Apr 2011 10:08:54 -0300, Nicolas Barrera <
> > nbarrera@gmail.com>
> > > > wrote:
> > > >
> > > >> Hi,
> > > >
> > > > Hi!
> > > >
> > > >> What I 've faced trying to setup this using Tapestry 5.1.0.5... is
> > > >> that that code I added inside my head tag (that link to favicon) is
> > > >> erased and
> > > >> replaced by javascripts includes (other links) generated by
> tapestry.
> > > >
> > > > AFAIK, Tapestry doesn't erase anything inside <head>. Are you using a
> > > > layout component?
> > > >
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: users-help@tapestry.apache.org
> > >
> > >
> >
>
Re: How to setup favicon?
Posted by Bryan Lewis <jb...@gmail.com>.
I haven't had any trouble defining a favicon, and I run in Jetty both on my
dev machine ond on our production server. I put the icon file in
src/main/webapp/i. My layout component does:
<head>
<title>${title}</title>
<link rel="icon" type="image/x-icon" href="${context:/i/filename.ico}"/>
<link rel="shortcut icon" type="image/x-icon"
href="${context:/i/filename.ico}"/>
</head>
(I forget why I needed both links and maybe I don't any more... some browser
inconsistency.)
On Fri, Apr 8, 2011 at 10:23 AM, Nicolas Barrera <nb...@gmail.com> wrote:
> Hi!, thanks for both responses...
>
> Are you using a layout component?
> >
> >
> yes I 'm...
>
> Are you running in Jetty?
> >
> >
> yes also...
>
>
> guys... 're you some kind of mentalist? ;)
>
> I 'll try it on tomcat... but I asked it right away because looking into
> generated html I couldn't see the link to the .ico I 've added...
>
>
> Anohter thing I 'm doing different is that I 'm not adding the favicon.ico
> as a Tapestry asset, as Nicola does...
>
> <link href="${asset:context:/favicon.ico}" rel="shortcut icon" />
> >
>
> will try that also...
>
> thanks, 'll be back with results
>
> Nicolás.-
>
>
> On Fri, Apr 8, 2011 at 10:30 AM, Nicola Buso <nicola.buso@infocert.it
> >wrote:
>
> > Are you running in Jetty? I notice it replace my favicon on localhost
> > (mvn jetty:run); under tomcat my favicon is shown:
> >
> >
> > on my layout component as usual:
> >
> > <link href="${asset:context:/favicon.ico}" rel="shortcut icon" />
> >
> >
> > nicola.
> >
> >
> > On 04/08/2011 03:11 PM, Thiago H. de Paula Figueiredo wrote:
> > > On Fri, 08 Apr 2011 10:08:54 -0300, Nicolas Barrera <
> nbarrera@gmail.com>
> > > wrote:
> > >
> > >> Hi,
> > >
> > > Hi!
> > >
> > >> What I 've faced trying to setup this using Tapestry 5.1.0.5... is
> > >> that that code I added inside my head tag (that link to favicon) is
> > >> erased and
> > >> replaced by javascripts includes (other links) generated by tapestry.
> > >
> > > AFAIK, Tapestry doesn't erase anything inside <head>. Are you using a
> > > layout component?
> > >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
Re: How to setup favicon?
Posted by Nicolas Barrera <nb...@gmail.com>.
Sorry to bother again,
it didn't work
tested on tomcat after generating the .war and also using mvn jetty:run
here I paste the generated head tag:
> <head>
> <title>title</title>
> <link type="text/css" rel="stylesheet"
> href="/appName/assets/tapestry/5.1.0.5/default.css"></link>
> <link type="text/css" rel="stylesheet"
> href="/appName/assets/blackbird/5.1.0.5/blackbird.css"></link>
> <link type="text/css" rel="stylesheet"
> href="/appName/assets/ctx/1.0.0.0-SNAPSHOT/css/main.css"></link>
> <meta content="Apache Tapestry Framework (version 5.1.0.5)"
> name="generator"></meta>
> <script
>
> src="/appName/assets/virtual/H4sIAAAAAAAAAIXOMQ7CMAwFUDMgLoIQQmpchg6MbEyAVC6QhrRqKSSKXUQ5E1fjDjRFqcRS5O3rfduvN0yfAJMNAMxghZJIMyEpV1qWqqlNQ5iItYhFgtYZNtxaLSoCMW5$002fUu$002bX417nuVbcy3mQLK0mdu2AQuDVIqisluqSle48sCHxLvq7LbpqIlno$002fngcuOIHetdNlO63x3R3OGEl7$002fL7P9amKG9d4wPoKMZvQgEAAA$003d$003d.js"
> type="text/javascript"></script>
> </head>
>
>
here's the head tag I 'm using in my Layout.tml (the only reference to
<head> tag in my project)
<head>
> <title>Afip Santo Tome Web Application</title>
> <link href="${asset:context:/favicon.ico}" rel="shortcut icon"
> type="image/x-icon"/>
> </head>
>
>
ALSO I 'd like to say that even though I keep seeing the tomcat or jetty
favicon... the favicon.ico file that is inside the generated war is the
tapestry favicon, not mine...
hope you could give me some invoices,
cheers
Nicolás.-
On Fri, Apr 8, 2011 at 11:23 AM, Nicolas Barrera <nb...@gmail.com> wrote:
> Hi!, thanks for both responses...
>
>
> Are you using a layout component?
>>
>>
> yes I 'm...
>
>
> Are you running in Jetty?
>>
>>
> yes also...
>
>
> guys... 're you some kind of mentalist? ;)
>
> I 'll try it on tomcat... but I asked it right away because looking into
> generated html I couldn't see the link to the .ico I 've added...
>
>
> Anohter thing I 'm doing different is that I 'm not adding the favicon.ico
> as a Tapestry asset, as Nicola does...
>
>
> <link href="${asset:context:/favicon.ico}" rel="shortcut icon" />
>>
>
> will try that also...
>
> thanks, 'll be back with results
>
> Nicolás.-
>
>
>
> On Fri, Apr 8, 2011 at 10:30 AM, Nicola Buso <ni...@infocert.it>wrote:
>
>> Are you running in Jetty? I notice it replace my favicon on localhost
>> (mvn jetty:run); under tomcat my favicon is shown:
>>
>>
>> on my layout component as usual:
>>
>> <link href="${asset:context:/favicon.ico}" rel="shortcut icon" />
>>
>>
>> nicola.
>>
>>
>> On 04/08/2011 03:11 PM, Thiago H. de Paula Figueiredo wrote:
>> > On Fri, 08 Apr 2011 10:08:54 -0300, Nicolas Barrera <nbarrera@gmail.com
>> >
>> > wrote:
>> >
>> >> Hi,
>> >
>> > Hi!
>> >
>> >> What I 've faced trying to setup this using Tapestry 5.1.0.5... is
>> >> that that code I added inside my head tag (that link to favicon) is
>> >> erased and
>> >> replaced by javascripts includes (other links) generated by tapestry.
>> >
>> > AFAIK, Tapestry doesn't erase anything inside <head>. Are you using a
>> > layout component?
>> >
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
Re: How to setup favicon?
Posted by Nicolas Barrera <nb...@gmail.com>.
Hi!, thanks for both responses...
Are you using a layout component?
>
>
yes I 'm...
Are you running in Jetty?
>
>
yes also...
guys... 're you some kind of mentalist? ;)
I 'll try it on tomcat... but I asked it right away because looking into
generated html I couldn't see the link to the .ico I 've added...
Anohter thing I 'm doing different is that I 'm not adding the favicon.ico
as a Tapestry asset, as Nicola does...
<link href="${asset:context:/favicon.ico}" rel="shortcut icon" />
>
will try that also...
thanks, 'll be back with results
Nicolás.-
On Fri, Apr 8, 2011 at 10:30 AM, Nicola Buso <ni...@infocert.it>wrote:
> Are you running in Jetty? I notice it replace my favicon on localhost
> (mvn jetty:run); under tomcat my favicon is shown:
>
>
> on my layout component as usual:
>
> <link href="${asset:context:/favicon.ico}" rel="shortcut icon" />
>
>
> nicola.
>
>
> On 04/08/2011 03:11 PM, Thiago H. de Paula Figueiredo wrote:
> > On Fri, 08 Apr 2011 10:08:54 -0300, Nicolas Barrera <nb...@gmail.com>
> > wrote:
> >
> >> Hi,
> >
> > Hi!
> >
> >> What I 've faced trying to setup this using Tapestry 5.1.0.5... is
> >> that that code I added inside my head tag (that link to favicon) is
> >> erased and
> >> replaced by javascripts includes (other links) generated by tapestry.
> >
> > AFAIK, Tapestry doesn't erase anything inside <head>. Are you using a
> > layout component?
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
Re: How to setup favicon?
Posted by Nicola Buso <ni...@infocert.it>.
Are you running in Jetty? I notice it replace my favicon on localhost
(mvn jetty:run); under tomcat my favicon is shown:
on my layout component as usual:
<link href="${asset:context:/favicon.ico}" rel="shortcut icon" />
nicola.
On 04/08/2011 03:11 PM, Thiago H. de Paula Figueiredo wrote:
> On Fri, 08 Apr 2011 10:08:54 -0300, Nicolas Barrera <nb...@gmail.com>
> wrote:
>
>> Hi,
>
> Hi!
>
>> What I 've faced trying to setup this using Tapestry 5.1.0.5... is
>> that that code I added inside my head tag (that link to favicon) is
>> erased and
>> replaced by javascripts includes (other links) generated by tapestry.
>
> AFAIK, Tapestry doesn't erase anything inside <head>. Are you using a
> layout component?
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: How to setup favicon?
Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Fri, 08 Apr 2011 10:08:54 -0300, Nicolas Barrera <nb...@gmail.com>
wrote:
> Hi,
Hi!
> What I 've faced trying to setup this using Tapestry 5.1.0.5... is that
> that code I added inside my head tag (that link to favicon) is erased and
> replaced by javascripts includes (other links) generated by tapestry.
AFAIK, Tapestry doesn't erase anything inside <head>. Are you using a
layout component?
--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org