+

Search Tips   |   Advanced Search

Manage JavaServer Faces implementations

JavaServer Faces (JSF) is a user interface framework or (API) that eases the development of Java based web applications. The product supports JSF at a runtime level, which reduces the size of web applications because runtime binaries do not need to be included in the web application. Use wsadmin.sh to set the JSF implementation as the Sun Reference 1.2 implementation or the Apache MyFaces 2.0 project.

The JSF runtime:

  1. Start the wsadmin scripting tool.

  2. Determine whether to use JSF with the applications.

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

  3. Set the JSF implementation.

    Use the modifyJSFImplementation command (AdminTask) to set the JSF implementation.

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

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

    • The following example sets the MyFaces implementation for JSF:

        AdminTask.modifyJSFImplementation('application _name', '[-implName "MyFaces"]')

    The only valid values for the -implName" parameter are SunRI1.2 and MyFaces.

    • SunRI1.2 sets the JSF implementation to the SunRI 1.2 implementation.

    • MyFaces sets the JSF implementation to the default implementation, which is MyFaces 2.0.

  4. Recompile the JSPs (JSP) if you switched implementations and use precompiled JSPs (JSP) containing JSF.


Related concepts

  • JavaServer Faces
  • JSP class loading settings

  • JSFCommands (AdminTask)
  • JSP and JSF option settings