Project Documentation


Dependencies of Apache Trinidad include:

  • Java 5
  • Either the JSF 1.1 reference implementation or later or MyFaces 1.0.8 or later, and their respective dependencies.


The Apache Trinidad deliverables are:

  • trinidad-api-1.0.1-SNAPSHOT.jar: public APIs of Apache Trinidad, all in the org.apache.myfaces.trinidad package
  • trinidad-impl-1.0.1-SNAPSHOT.jar: private APIs of Apache Trinidad, all in the org.apache.myfaces.trinidadinternal package

Developers are strongly encouraged to compile against the Trinidad API JAR only - this will ensure that you are only using public APIs.

General Installation

Apache Trinidad is designed to run on any J2EE-compliant application server. To install Apache Trinidad outside of a JDeveloper-based environment, take the following steps:

  1. Install either JSF 1.1.01 reference implementation or MyFaces 1.0.8 or later, and their respective dependencies. Please consult your application server provider for documentation on this step.
  2. Install the Apache Trinidad libraries and dependencies in WEB-INF/lib.
  3. Register the Apache Trinidad filter in your WEB-INF/web.xml:
        <!-- This assumes that the FacesServlet has been registered -->
        <!-- under the name "faces" -->
  4. Tell JSF to use the Apache Trinidad RenderKit by adding the following to your faces-config.xml:
  5. Register the ResourceServlet that would be used for serving the resources at runtime(images, javascripts and styles):
    <!-- This cannot be configured currently -->

In addition, it is strongly recommended that you enable client-side state saving, again in WEB-INF/web.xml. Apache Trinidad offers a much improved version of client-side state saving that is a significant improvement over standard server-side state saving. State is still saved in the HttpSession, but a token is sent to the client to disambiguate instances of a page, and session-based state is serializable to support failover.


Finally, if you plan on using Facelets, you should add the following items to your WEB-INF/web.xml.

    <!-- TrinidadFaceletViewHander must be the alternate view handler if SessionChangeManager is used -->

    <!--Unfortunately, Facelets provides no hook for plugging the PageResolver into the logic 
      handling "facelets.VIEW_MAPPINGS". You should leave "facelets.VIEW_MAPPINGS" 
      unset and use "org.apache.myfaces.trinidad.FACELETS_VIEW_MAPPINGS" instead.-->

Make sure to also remove the default com.sun.facelets.FaceletViewHandler from your faces-config.xml. Trinidad comes with its own ViewHandler which needs to be invoked in the correct order with the Facelet specific ViewHandler noted above. If you specified the alternative view handler parameter as described above, it will be called by the Apache Trinidad ViewHandler at the right time. Note that if Session based change persistence is not used, com.sun.facelets.FaceletViewHandler or any of its custom extensions can be set as the alternate view handler. For information about enabling Change Persistence feature, please see the 'Configuring Apache Trinidad' developer guide chapter.

Configuration for Development

If you are an application developer, there are


The demos are available in trinidad-demo.war.

One of the demos allows you to check email. If you are not running in a J2EE 1.3 (or higher) server you will need to add the jars listed below to adf-faces-demo/WEB-INF/lib.

  • JavaMail - go to download button for "Download JavaMail API Implementation Version 1.2 " and download ''. Extract the jar:
    • mail.jar
  • JavaBeans Activation Framework - go to the download button and download ''. Extract the jar:
    • activation.jar

To access the demos, start at index.jspx.