0

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 with coreJSv1

APP2 with coreJSv2

APP1 --> navigate through APP1 screens and do your things --> make the call to APP2 and load its own resources --> Navigate through APP2 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.

Community
  • 1
  • 1
Vity
  • 61
  • 2
  • 3
  • Assuming they are not different war files (context path would be different then): If the filename is the same and the path (and library, version) is the same then they are validly assumed to be the same. So change one of these... https://stackoverflow.com/questions/11988415/what-is-the-jsf-resource-library-for-and-how-should-it-be-used. – Kukeltje Jun 29 '18 at 09:16
  • Oh and _"or something is out of the question for our client due to their reasons."_ Customers **ALWAYS** should keep in mind they can ask/request things but not demand the impossible ;-) – Kukeltje Jun 29 '18 at 10:41
  • yeah i see your point and have argued extensibly about that believe me :). Thanks for the link it was pretty useful, in fact I think we will try the versioning approach. Thanks – Vity Jul 06 '18 at 07:45

0 Answers0