Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Problem with favicon.ico

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everybody in javaranch
I've got some problems here ,on my deployment apache tomcat5 server
i have about 7 working websites , in production mood , all of them under webapps folder ,,inside apache
i know that in order to change the url icon displayed in the lift corner of the adress bar , i have to replace the file
favicon.ico
which located under , ../webapps/root
whith my own favicon.ico file
but the problem is that i dont want to change all the url icons for my 7 websites,,,
and each website has its own url icon
and ofcourse i dont want to fix this problem by providing a link inside the header of each jsp in each website ...
this of course will be so booring...
can anyone please help me do some configuration in order to assign each url icon , to its own website ,,through some tomcat configurations
thanks for help
Best regards
 
Hooplehead
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think there is a configuration to help you out, but you could write a simple servlet, filter or whatever that checks out the http referral address and responds with (or redirects to) a domain specific favicon file.

Stu
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Hi, i got the same situation. I need to place different favicons ( 3 different ones for 3 webapps ) under the same tomcat.
I need it urgent. Can you guys tell me what exactly i need to do for this i mean, Can you explain how to implement this using servlet / filter ?

Thanks for letting us know that there is no configuration kind of setting for this.
 
Marshal
Posts: 67451
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"I need it urgent." is a code phrase for "ignore my post".

Please read this for more information.
 
Bear Bibeault
Marshal
Posts: 67451
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The favicon file can be placed for each webapp individually. No servlets or filters are necesary.
 
Phanidhar Kandala
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bear Bibeault ,

Thanks for letting me know how to ask questions in forums. Thsi is the first time i registered in a forum. I read the Faq after your reply and trying to implement accordingly.
Coming to the different favicon implementation for different webapps in same tomcat,
Its good to know that there is some configuration we can do.
Can you please let me know how i can do

Thanks for your reply
 
Ranch Hand
Posts: 205
Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do all your 7 websites code base is spread across the same war folder?

If no, just place respective favicon in respective website root folder available inside war folder

Then clear cache and try accessing

 
Phanidhar Kandala
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks eshwar.
I tried to place the respective favicon in the root directory of each webapp,eg: tomcat/webapps/jsp-examples/jsp_favicon.ico and
tomcat/webapps/servlet-examples/servlet_favicon.ico

But, when i tried to access the webapps, http://localhost/jsp-examples and http://localhost/servlet-examples, the favicons are not getting displayed though, the default tomcat favicon is not getting displayed.

Is this the one i need to do to get individual favicons for each webapp inside same tomcat ? or am i missing something ?
can you please help me in this...

Thanks,
Phanidhar.
 
Skanda Raman
Ranch Hand
Posts: 205
Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Rename jsp_favicon.ico to favicon.ico->> then clear cache and restart browser to view changes!!

Also, find if article under below link helps you

http://www.w3.org/2005/10/howto-favicon
 
Phanidhar Kandala
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Everyone,

I was able to do it as the websites are having some templates ( Magnolia Content Management System ) and i included the code in the template and it got displayed when i placed the <link ...> element in the header.jsp which is included in all the pages.

Now, the problem is it is not getting displayed when the tomcat on the prod is behind the Load balancer.

When i try to access it directly with webapp's IP i.e ,http://166.60.75.130:8080/home.jsp, it is getting displayed but, the host name of webapp, http://www.myapp.com is mapped to the load balancer 166.60.75.47 and it is delegating the requests to the tomcat.

What can i do in this regard? Can anyone help me solve this

Thanks,
Phani
 
Greenhorn
Posts: 12
Spring Tomcat Server Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Eshwar,

Your post was useful.

-> Having the 'favicon.ico' inside the Web-Content folder of the application AND
-> Having the following line inside the head tag of the jsp worked for me.
<LINK REL="SHORTCUT ICON" HREF="favicon.ico">
 
I am going to test your electrical conductivity with this tiny ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
    Bookmark Topic Watch Topic
  • New Topic