+

Search Tips   |   Advanced Search

Manage Java Server Faces implementations using scripting


Java Server Faces (JSF) is a user interface framework or API that eases the development of Java based Web apps. WAS ND v7.0 supports JSF at a runtime level, which reduces the size of Web applications since runtime binaries no longer need to be included in the Web app. Use wsadmin to set the JSF implementation as the Sun Reference 1.2 implementation or the Apache MyFaces 1.2 project.

The JSF runtime:

 

  1. Launch the wsadmin scripting tool using the Jython scripting language.

  2. Determine whether to use JSF with the applications.

    Review specification documentation for JSF 1.2 to determine whether to use JSF with the applications. Then, determine which implementation to use. Use the Sun Reference Implementation or the open source Apache MyFaces project. The Sun Reference Implementation is the default implementation.

  3. Set the JSF implementation. Use the modifyJSFImplementation command for AdminTask to set the JSF implementation.

    • The following example sets the Sun Reference Implementation for JSF:

      AdminTask.modifyJSFImplementation('myApplication', '[-implName "SunRI1.2"]')

    • The following example sets the MyFaces implementation for JSF:

      AdminTask.modifyJSFImplementation('myApplication', '[-implName "MyFaces1.2"]')

  4. Recompile the JSPs if we switched implementations and use precompiled JSPs that contain JSF.


Java Server Faces
JSP class loading settings

 

Related


JSFCommands
JSP and JSF option settings