Tags in my blog

09 May 2009

JSF Implementation

There are 2 JSF implementations that I ever try to use. There are Mojarra (seperated project to use JSF implementation outside Glassfish Application Server) and Apache MyFaces from ASF.

These are minimum required files for Mojarra:
- jsf-api.jar
- jsf-impl.jar
that could be downloaded from here.

These are minimum required files for Apache MyFaces:
- myfaces-api-1.2.6.jar
- myfaces-impl-1.2.6.jar
could be downloaded from here.

When I started my web app with tomcat that could run already using Mojarra and change the implementation to MyFaces, the framework asked me to add 2 more files:
- commons-discovery-0.4.jar, and
- commons-codec-1.3.jar

In the web.xml i do not need to change anything. This is part of my web.xml:

<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>

<!-- Faces Servlet -->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>

<!-- Faces Servlet Mapping -->
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>

No comments: