How to Use MyFaces with GlassFish - an Update

Most migrations to GlassFish are straight-forward, a testimony to the value of the JavaEE specification (and to the extra care to the user in the GF community!). The only area that sometimes requires non-trivial changes are dependencies on implementation details in MyFaces.

The GlassFish JSF implementation (Mojarra) is Used in Many Containers and the new JSF 2.0 spec should improve portability but GF supports a useMyFaces Property for this use case. Arun just published a note showing how to use the property when Using Apache Tomahawk but I'm extracting here the configuration table for ease of reference:

ALT DESCR

• On GlassFish v2 - Set "useMyFaces" in "sun-web.xml"
• On GlassFish v3 Prelude - Not supported
• On GlassFish v3 Trunk - Set "useMyFaces" OR "useBundledJsf" in "sun-web.xml".

Note that you also need to disable Facelets 2.0 in "web.xml" if you have Facelets 1.1.x dependencies.

Comments:

Post a Comment:
Comments are closed for this entry.