Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Frustration creating a custom favicon
I am trying to replace the default Vaadin web icon for my application. After reading the BOV and posts on this forum, I was lead to believe that I should create a custom theme and place my application icon there. However, my current Vaadin application does NOT contain a WebContent folder. Even after creating it, when I try to create a custom theme via Eclipse I receive a message indicating it cannot find the WebContent folder. Can anyone please give me guidance on such a trivial issue.
Which brings me to my next point. I understand the need to create custom themes and such, but for replacing the default icon there should really be a simpler way to do it.
The "WebContent" folder is not necessarily named WebContent ( I dont use Eclipse, so I cannot say exactly where you should place your folder ) . It is simply the folder that contains the static content (image, html, jsp files) of your application.
In Maven projects it will be src/main/webapp
Creating a theme ( by extending a core theme ) is really easy. Besides if you want to do any CSS customization you will need a custom theme...
Thanks for the reply. I am familiar with how to do this with earlier versions of vaadin. With Vaadin 7, there is not a themes folder. Its in a .jar file. So is the process the same for creating custom themes with Vaadin7? I will try it and keep the forum posted.
with linux, that is debian 6 "squeeze", I put the favicon.ico into /var/lib/tomcat6/webapps/myapp/VAADIN/themes/mytheme
Eric Dobbs: Petrus,
..... With Vaadin 7, there is not a themes folder. Its in a .jar file. So is the process the same for creating custom themes with Vaadin7? I will try it and keep the forum posted.
Yes the processes of making a custom theme in v 7 is virtually the same as in v6. They simply packaged the core themes in a separate jar..
The easiest way to accomplish this is to either use the Eclipse plugin to create a theme stub and place the icon in the theme folder. If you are using Maven, create a VAADIN/themes/themename package under webapp (create webapp too if you don't have it already) and place the icon there along your styles.(s)css file. See https://vaadin.com/wiki/-/wiki/Main/Creating%20a%20theme%20using%20sass for more details on creating the theme.
I would not recommend putting the icon directly into the Tomcat directory like Thomas recommended, since you'll need to do that every time you do a clean deploy or deploy to a new server. Better to have the icon bundled with the war.
Thanks Marcus, that worked perfectly!!