如何强制WebSphere AS 8使用特定的JSF实现? [英] How to force WebSphere AS 8 to use a specific JSF implementation?

查看:185
本文介绍了如何强制WebSphere AS 8使用特定的JSF实现?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用WAS 6.1开发的旧企业应用程序,现在我的公司正在尝试在WAS 8中执行该应用程序的实现.但是我在呈现JSF内容时遇到了麻烦,单击某些链接时, JS调试器说 Uncaught ReferenceError: myfaces is not defined 是呈现的HTML:

I have an old enterprise application that was developed using WAS 6.1, now my company is trying to perform the implementation of that application in WAS 8. But I am having troubles rendering the JSF content, there are some links that when clicked the JS debugger says Uncaught ReferenceError: myfaces is not defined being the rendered HTML:

onclick="return myfaces.oam.submitForm('top_nav:frmTopNav','top_nav:frmTopNav:lnkCP',null,[['default_sort','name']]);"

由于我的旧应用程序和WAS 8之间的JSF版本不同,所以我认为它不能很好地渲染它.

So I think it's not rendering it well because of the different versions of JSF between my old application and WAS 8.

现在,我决定强制使用它,并使用Tomahawk 1.1.7下载MyFaces 1.1,并将其放在WEB-INF/lib文件夹中,现在它显示java.lang.IllegalArgumentException - Class org.mything.LocaleViewHandler is no javax.faces.application.ViewHandler

Now I decided to force it, downloading the MyFaces 1.1 with Tomahawk 1.1.7 and putting them in the WEB-INF/lib folder, and now it says java.lang.IllegalArgumentException - Class org.mything.LocaleViewHandler is no javax.faces.application.ViewHandler

为什么会这样?

谢谢.

推荐答案

从WAS 8信息中心报价,

Quoting from WAS 8 infocenter, Configuring JavaServer Faces implementation

如果您要使用第三方JSF实现,而不是 随产品一起提供,然后:

If you want to use a third-party JSF implementation that is not shipped with the product, then:

  • 将配置保留为MyFaces.
  • 将第三方侦听器添加到所需的web.xml文件中.
  • 将第三方实现Java存档(JAR)文件添加到 应用程序作为隔离的共享库,并将其与您的应用程序关联.
  • 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.

在上面引用的页面上,您可以在将共享库与应用程序或模块关联.

On the above referenced page you may find details on Creating shared libraries and Associating shared libraries with applications or modules.

这篇关于如何强制WebSphere AS 8使用特定的JSF实现?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆