Use implicit EL #{resource}
handler to let JSF convert a resource identifier to proper URL.
<link ... href="#{resource['default:img/favicon.ico']}" />
Note that this is also the way you're supposed to use to reference background images in CSS files.