我有一个使用 WAS 6.1 开发的旧企业应用程序,现在我的公司正在尝试在 WAS 8 中执行该应用程序的实现。但是我在呈现 JSF 内容时遇到了麻烦,有一些链接在单击JS 调试器说
未捕获的 ReferenceError:未定义 myfaces
是呈现的 HTML:
onclick="return myfaces.oam.submitForm('top_nav:frmTopNav','top_nav:frmTopNav:lnkCP',null,[['default_sort','name']]);"
所以我认为它不能很好地呈现它,因为我的旧应用程序和 WAS 8 之间的 JSF 版本不同。
现在我决定强制执行它,使用 Tomahawk 1.1.7 下载 MyFaces 1.1 并将它们放在 WEB-INF/lib 文件夹中,现在它显示 java.lang.IllegalArgumentException - Class org.mything.LocaleViewHandler不是 javax.faces.application.ViewHandler
为什么会这样?
提前谢谢你。
最佳答案
引自 WAS 8 信息中心,Configuring JavaServer Faces implementation
If you want to use a third-party JSF implementation that is not shipped with the product, then:
- Keep the configuration set to MyFaces.
- Add the third-party listener to the web.xml file that is required.
- Add the third-party implementation Java archive (JAR) files to the application as an isolated shared library and associate it with your application.
在上述引用页面上,您可以找到有关 Creating shared libraries 的详细信息和 Associating shared libraries with applications or modules .
关于java - 如何强制 WebSphere AS 8 使用特定的 JSF 实现?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11477995/