We are using JSF2 and xhtml pages through composition and we found ourselves with this problem.
We deliver the applications as independent ear files with the base structure of the pages and the core JS file packaged in a jar. When we have this scenario:
APP1
withcoreJSv1
APP2
withcoreJSv2
APP1
--> navigate throughAPP1
screens and do your things --> make the call toAPP2
and load its own resources --> Navigate throughAPP2
screens and do your things.
The JS core file loads when entering APP1
, but then when we go to APP2
and finished loading and you are in it, the JS loaded is still the one belonging to APP1
.
The naming of the files is the same, let's say core.js
and getting this files out as a shared librarie or something is out of the question for our client due to their reasons.
Does anyone know how can I force to each application to load its own JS file?
Thanks in advance.