How to force WebSphere AS 8 to use a specific JSF implementation?

Juan Diego picture Juan Diego · Jul 13, 2012 · Viewed 7.8k times · Source

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']]);"

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

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

Why could this be happening?

Thank you in advance.

Answer

Kurtcebe Eroglu picture Kurtcebe Eroglu · Jul 14, 2012

Quoting from WAS 8 infocenter, 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.

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