FileNotFoundException when using Facelets tagfile

白昼怎懂夜的黑 提交于 2019-12-02 06:06:17

I was experiencing the same problem, my project (Glassfish 4 + Spring + EJB 3 + JSF 2.2 + Custom Tags) was running fine on my local Glassfish and on a staging server, but on Production it was throwing an exception TagException: /WEB-INF/templates/common.xhtml @38,33 <app:div> null.

After a lot of debugging we found out the problem. If your Glassfish have more than one virtual server configured and your project is deployed and associated with 2 or more, the JSF lib reads the sources files through the current host name you are accessing it, however for custom facelets tags it reads through a different virtual server (probably a bug) and throws a FileNotFoundException (suppressed by TagException).

If you configure your deployed project to only one virtual server, this problem does not occur.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!