jairelton 5 de jan. de 2007
A palavra favicon origina de duas palavras em inglês: favorite e icon. Os favicons são pequenas imagens (normalmente 16 por 16 pixels) que ficam guardados no site para visualização pelo navegador.
Geralmente são utilizados como logotipos em tamanho reduzido, nos sites de empresas, entidades e marcas quaisquer.
Um exemplo é o "W" que aparece no browser quando se acessa a Wikipédia.
Há casos em que os favicons são constituídos de apenas uma letra, ou as iniciais de um nome de fantasia, como uma a...
A favicon /ˈfæv.ɪˌkɒn/ (short for favorite icon), also known as a shortcut icon, website icon, tab icon, URL icon, or bookmark icon, is a file containing one or more small icons, associated with a particular website or web page. A web designer can create such an icon and upload it to a website (or web page) by several means, and graphical web browsers will then make use of it. Browsers that provide favicon support typically display a page's favicon in the browser's address bar (someti Favicons c...
hopster 13 de ago. de 2008
tudo bem… mas como fica em JSP?
rafaelglauber 13 de ago. de 2008
Do mesmo jeito ou colocando o favicon.ico na raiz do projeto, quando fizer o deploy basta verificar se ele tá na pasta de seu projeto.
hopster 13 de ago. de 2008
isso eu entendi… mas nao entendi como colocar um html no meu codigo jsp. segue código.
& lt ;? xml version = "1.0" encoding = "UTF-8" ?& gt ;
& lt ; jsp : root version = "2.1" xmlns : f = "http://java.sun.com/jsf/core" xmlns : h = "http://java.sun.com/jsf/html" xmlns : jsp = "http://java.sun.com/JSP/Page" xmlns : webuijsf = "http://www.sun.com/webui/webuijsf" & gt ;
& lt ; jsp : directive . page contentType = "text/html;charset=UTF-8" pageEncoding = "UTF-8" /& gt ;
& lt ; f : view & gt ;
& lt ; webuijsf : page binding = "#{geral$index.page1}" id = "page1" & gt ;
& lt ; webuijsf : html binding = "#{geral$index.html1}" id = "html1" lang = "pt-BR" & gt ;
& lt ; webuijsf : head binding = "#{geral$index.head1}" id = "head1" title = "Portal MIS Florianópolis - 2008" & gt ;
& lt ; webuijsf : link binding = "#{geral$index.link1}" id = "link1" url = "/resources/stylesheet.css" /& gt ;
& lt ;/ webuijsf : head & gt ;
& lt ; webuijsf : body binding = "#{geral$index.body1}" id = "body1" style = "-rave-layout: grid" & gt ;
& lt ; webuijsf : form binding = "#{geral$index.form1}" id = "form1" & gt ;
& lt ; webuijsf : image binding = "#{geral$index.image1}" id = "image1" style = "left: 0px; top: 0px; position: absolute" url = "/resources/brt.jpg" /& gt ;
& lt ; webuijsf : image binding = "#{geral$index.image2}" id = "image2" style = "left: 0px; top: 72px; position: absolute; z-index: 501" url = "/resources/azulsup3.gif" /& gt ;
& lt ; webuijsf : image binding = "#{geral$index.image3}" id = "image3" style = "left: 0px; top: 96px; position: absolute; z-index: 502" url = "/resources/azulinf4.gif" /& gt ;
& lt ; webuijsf : image binding = "#{geral$index.image5}" id = "image5" style = "left: 768px; top: 72px; position: absolute; z-index: 503" url = "/resources/verdesup.gif" /& gt ;
& lt ; webuijsf : image binding = "#{geral$index.image6}" id = "image6" style = "left: 768px; top: 96px; position: absolute; z-index: 504" url = "/resources/verdeinf4.gif" /& gt ;
& lt ; webuijsf : image binding = "#{geral$index.image8}" id = "image8" style = "left: 600px; top: 0px; position: absolute; z-index: 500" url = "/resources/fudobrt.gif" /& gt ;
& lt ; webuijsf : image binding = "#{geral$index.image4}" id = "image4" style = "left: 192px; top: 144px; position: absolute" url = "/resources/login_verde5.gif" /& gt ;
& lt ; webuijsf : image binding = "#{geral$index.image10}" id = "image10" style = "left: 192px; top: 168px; position: absolute" url = "/resources/logo_verde2.gif" /& gt ;
& lt ; webuijsf : textField binding = "#{geral$index.usuario}" id = "usuario" style = "left: 408px; top: 288px; position: absolute; z-index: 509" /& gt ;
& lt ; webuijsf : passwordField binding = "#{geral$index.senha}" id = "senha" style = "left: 408px; top: 312px; position: absolute" /& gt ;
& lt ; webuijsf : messageGroup binding = "#{geral$index.messageGroup1}" id = "messageGroup1" style = "height: 94px; left: 192px; top: 360px; position: absolute; width: 238px" /& gt ;
& lt ; webuijsf : button actionExpression = "#{geral$index.logar_action}" binding = "#{geral$index.logar}" id = "logar"
style = "height: 24px; left: 455px; top: 360px; position: absolute; width: 120px; z-index: 503" text = "Acessar" /& gt ;
& lt ; webuijsf : staticText binding = "#{geral$index.staticText1}" id = "staticText1"
style = "color: orange; font-family: 'Verdana','Arial','Helvetica',sans-serif; font-size: 24px; font-weight: bold; height: 54px; left: 360px; top: 24px; position: absolute; width: 432px; z-index: 499" text = "PORTAL MIS FNS" /& gt ;
& lt ; webuijsf : hyperlink actionExpression = "#{geral$index.hyperlink1_action}" binding = "#{geral$index.hyperlink1}" id = "hyperlink1"
style = "color: rgb(0, 73, 117); font-size: 12px; font-style: normal; left: 96px; top: 576px; position: absolute; text-align: center; width: 646px"
text = "Fale conosco. Clique aqui" url = "/faces/geral/faleConosco.jsp" /& gt ;
& lt ;/ webuijsf : form & gt ;
& lt ;/ webuijsf : body & gt ;
& lt ;/ webuijsf : html & gt ;
& lt ;/ webuijsf : page & gt ;
& lt ;/ f : view & gt ;
& lt ;/ jsp : root & gt ;
rafaelglauber 13 de ago. de 2008
Testou isso que falei acima? Coloca o arquivo na raiz de seu projeto no tomcat, levanta sua aplicação e navega em algum browser (não vale IE < 7, pois eles não tem esse recurso de mostrar o favicon do lado da url).
hopster 13 de ago. de 2008
não deu certo, ficou com o icone do IE normal… não precisa adicionar nenhum codigo no meu projeto?
thingol 13 de ago. de 2008
Você precisa verificar se o arquivo está acessível da seguinte forma:
Digamos que sua aplicação está hospedada em http://www.guj.com.br .
Então você digita http://www.guj.com.br/favicon.ico e vê se aparece uma imagem no browser (não na linha de endereços). Se aparecer, então está acessível.
Note que se houver 200 aplicações diferentes, todas terão o mesmo ícone, porque favicon.ico deve estar na aplicação raiz (no caso do Tomcat, procure a aplicação “ROOT”).
Eduardo_Bregaida 13 de ago. de 2008
Para começar vc está usando JSF e para isso tudo que você colocar entre <f:view> para usar HTMl comum tem um jeito feio, colocar entre essas tags…
& lt ; f : verbatim & gt ;
TAGS HTML
& lt ;/ f : verbatim & gt ;
hopster 13 de ago. de 2008
galera obrigado. consegui passando o caminho completo da imagem…
assim…
& lt ; f : verbatim & gt ;
& lt ; html & gt ;
& lt ; head & gt ;
& lt ; link rel = "shortcut icon" href = "http://localhost:81/portal_fns/resources/favicon.ico" /& gt ;
& lt ;/ head & gt ;
& lt ;/ html & gt ;
& lt ;/ f : verbatim & gt ;
ah… e como dito acima, eu consigo desta forma para cada aplicação do tomcat uma imagem diferente. tenho duas aplicações no tomcat, cada uma com sua imagem.
ah… já sobre este assunto, tem um site que transforma qualquer imagem em ico… http://www.html-kit.com/favicon/
abraços