That's a bug in Mojarra. Their ScriptRenderer
was as per issue 1212 fixed to support query strings. However, their fix was wrong for the case a library
is specified. They used +
instead of &
as query string parameter separator, which only results in 404's:
<script src="/context/javax.faces.resource/reworkBase.js.xhtml?ln=js+version=1">
It should have been:
<script src="/context/javax.faces.resource/reworkBase.js.xhtml?ln=js&version=1">
I've reported this bug as issue 2168.
In the meanwhile your best bet is to just omit the library
altogether, given the library name of js
(which obviously stands for "JavaScript") you seem not to be interested in using configureable look'n'feel/scripting libraries at all.
<h:outputScript name="js/reworkBase.js?version=1" />
This will result in the right URL.
<script src="/context/javax.faces.resource/js/reworkBase.js.xhtml?version=1">