Hot deployment of js/jspx not working after upgrade to JSF2.1
On running the application with server setting "Run server with resources on server", hot deploying the jspx, after making some changes, does not reflect the changes on browser (even after deleting the cookies and temporary internet files). There are no error messages or logs generated. Changes are not reflecting on view source/debugger tool of the browser.
Steps to Reproduce
- Open any jspx page.
- Make some changes in it.
- Hot deploy the files in the server profile.
- Open the browser and see if the changes are displayed on screen.
The root cause of this problem is that the MyFaces caches aggresively. Even with HotDeployment it refers to cached version of jspx / jsf page.
This behavior can be addressed by adding PROJECT_STAGE entry in deployment descriptor as below:
With this context parameter, MyFaces will relax the Facelet caching strategy, causing it to recompile the Facelet file almost instantly.
0% found this useful