【发布时间】:2014-11-19 08:32:26
【问题描述】:
我有一个公共共享库(在 Websphere 应用程序服务器中设置为共享库)。
那个jar的文件夹结构是:
UtilityJAR
----src
-com
-test
-TestClass.java
---- META-INF
-resources
-template.xhtml
-css
-style.css
在我的 Web 项目中,我有一个名为 User.xhtml 的模板客户端文件,它使用来自上述共享库的模板文件
ui:composition template="/template.xhtml"
当我在 Web 应用程序的 WEB-INF/lib 文件夹中有上述 jar 文件时,应用程序工作正常,没有任何问题(模板.xhtml 被识别)。当我从该应用程序的 Lib 文件夹中删除 jar 并将其作为共享库放在 Websphere 中时(因为我需要来自 4 个以上应用程序的这个 jar 文件,并且我不想在所有 4 个应用程序中复制这个 jar),我收到以下错误消息。
[9/24/14 14:09:17:936 EDT] 00000113 ServletWrappe E com.ibm.ws.webcontainer.servlet.ServletWrapper service SRVE0014E: Uncaught service() exception root cause Faces Servlet: java.io.FileNotFoundException: /template.xhtml Not Found in ExternalContext as a Resource
Utility jar 中包含 faces-config 和 @ManagedBean 注解,当 jar 位于应用程序的 WEB-INF/lib 文件夹中时,该注解可以工作。
以前有人遇到过这个问题吗?感谢您的帮助。
【问题讨论】:
标签: jsf-2 jar shared-libraries facelets filenotfoundexception