Trinidad Hello, World Hands On
———————————————
1. In Eclipse, highlight the lab01Web project, then
press Ctrl+C followed by Ctrl+V. Name the new project
firstTrinidadWeb.
2. Right-click on the new project and choose Properties.
In the Web Project Settings, change the Context Root to
firstTrinidadWeb.
3. Obtain trinidad-api-2.0.1.jar and trinidad-impl-2.0.1.jar, then copy them
to the new project’s WEB-INF/lib folder.
4. Additions to web.xml:
resources
org.apache.myfaces.trinidad.webapp.ResourceServlet
resources
/adf/*
trinidad
org.apache.myfaces.trinidad.webapp.TrinidadFilter
trinidad
Faces Servlet
javax.faces.STATE_SAVING_METHOD
client
org.apache.myfaces.trinidad.ALTERNATE_VIEW_HANDLER
org.apache.myfaces.trinidadinternal.facelets.TrinidadFaceletViewHandler
org.apache.myfaces.trinidad.FACELETS_VIEW_MAPPINGS
*.xhtml
5. Additions to faces-config.xml:
org.apache.myfaces.trinidad.core
6. Changes to name.xhtml:
Add to element: xmlns:tr="http://myfaces.apache.org/trinidad"
Change the following paragraph from standard JSF:
To:
The above does the same thing as the standard JSF, but also adds for validation and
conversion messages.
7. Run the project as normal.