Managing JavaServer Faces implementations using wsadmin scripting

JavaServer Faces (JSF) is a user interface framework or application programming interface (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 your web application. Use the wsadmin tool to set the JSF implementation as the Sun Reference 1.2 implementation or the Apache MyFaces 2.0 project.

About this task

The JSF runtime:
  • Makes it easy to construct a user interface from a set of reusable user interface components.
  • Simplifies migration of application data to and from the user interface.
  • Helps manage user interface state across server requests.
  • Provides a simple model for wiring client-generated events to server-side application code.
  • Supports custom user interface components to be easily build and reused.

Procedure

  1. Start the wsadmin scripting tool.
  2. Determine whether to use JSF with your applications.

    Review specification documentation for JSF 2.0 to determine whether to use JSF with your applications. Then, determine which implementation to use. You 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 for the AdminTask object 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 "MyFaces"]')
  4. Recompile the JavaServer Pages (JSP) if you switched implementations and use precompiled JavaServer Pages (JSP) that contain JSF.



In this information ...


IBM Redbooks, demos, education, and more

(Index)

Use IBM Suggests to retrieve related content from ibm.com and beyond, identified for your convenience.

This feature requires Internet access.

Task topic Task topic    

Terms of Use | Feedback

Last updatedLast updated: Sep 19, 2011 5:16:49 PM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=matt&product=was-base-iseries&topic=txml_7jsf
File name: txml_7jsf.html