4

I am familiar with the classloading trouble when using JSF 2 in Websphere 7. I'd like to know if there are similar problems on other fullstack application servers. What about JBoss 5+, WebLogi 10+, etc? Are there any known issues with JSF 2 and if so, what needs to be done to get JSF 2 running on these servers?

Thx

tasel
  • 619
  • 5
  • 15

3 Answers3

5

On WebSphere 5.x up to with the current 8.x you need to set the WAR and EAR classloader to PARENT_LAST in the WAS admin console whenever you want to bundle and use your own JSF impl in /WEB-INF/lib.

On JBoss 4.x up to with the current 6.x it's sufficient to add the following context param to /WEB-INF/web.xml to suppress JBoss' builtin JSF deployer.

<context-param>
    <param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
    <param-value>true</param-value>
</context-param> 

On Glassfish 2.x up to with the current 3.x you need to add the following entries to the /WEB-INF/sun-web.xml (Eclipse with Glassfish plugin should autogenerate the template file if you create a web project with target runtime set to Glassfish).

<class-loader delegate="false" />
<property name="useBundledJsf" value="true" />

On Weblogic, sorry I have no idea, I have never used it.

BalusC
  • 992,635
  • 352
  • 3,478
  • 3,452
  • Thx for the hints. It seems to me like requiring app servers to ship with an JSF implementation to be standard compliant was not the best idea as vendors tend to need ages to adapt to new standards. It creates a lot of confusion amongst developers on how to deal with outdated implementations. – tasel Apr 28 '11 at 19:16
0

Here is a brief how-to for the library concept Jeff mentioned. http://blog.eisele.net/2009/07/jsf-20-beta-1-on-oracle-weblogic-10gr3.html

Seeing the latest WLS 12c it still is in place but AFAIK you will end up having to revert the web-app classloader in the future in favor of this concept.

Markus Eisele
  • 702
  • 4
  • 9
  • Thx for your answer. I was able to gain some experience on this issue in the meantime. Seems like making the latest JSF releases available in full blown applcitation servers always requires fiddling wit classloaders. Even worse: Delivering alternative versions of JSF might affect vendor support... So your vendor meight tell you that despite youre paying insane amounts of money for support, it will not be granted due to usage of unsupported JSF versions. So if you are using a commercial app server and want to keep your support: Stick with old JSF versions until the vendor ships a new version. – tasel May 07 '12 at 09:16
0

In WebLogic there is a shared Java EE library that is included with WebLogic for JSF 2.0. It is easy to use and referenced through a deployment descriptor.

Jeff West
  • 1,555
  • 9
  • 10
  • Thats fine for now and maybe the next two years. But what if JSF 3 is released? Do I have to revert classloader hirarchy (like in Websphere 7, shipped with JSF 1.2) to use it from WEB-INF/lib? – tasel Apr 28 '11 at 19:11