Take this as an example:
<h:outputScript library="js" name="foo.js" />
This can be transformed into:
<script type="text/javascript"
src="/welcomepage/javax.faces.resource/foo.js.jsf?ln=js"></script>
Pay attention to the .jsf?ln=js
part.
But why is that necessary?