Navigation





MyFaces Tobago quick installation guides

,


Bookmark and Share

To install MyFaces Tobago JSF components you should first download and import JAR files listed below:

avalon-framework.jar
commons-el.jar
commons-fileupload.jar
commons-io.jar
commons-lang.jar
log4j.jar
logkit.jar
tobago-core.jar
tobago-theme-charlotteville.jar
tobago-theme-richmond.jar
tobago-theme-scarborough.jar
tobago-theme-speyside.jar
tobago-theme-standard.jar

Be sure that you already have installed and verified installation of standard JSF library. After you import JARs, you should add couple of lines in your web.xml file:

<filter>
<filter-name>multipartFormdataFilter</filter-name>
<filter-class>
org.apache.myfaces.tobago.webapp.TobagoMultipartFormdataFilter
</filter-class>
</filter>
<filter-mapping>
<filter-name>multipartFormdataFilter</filter-name>
<url-pattern>*.faces</url-pattern>
</filter-mapping>
<listener>
<listener-class>
org.apache.myfaces.tobago.webapp.TobagoServletContextListener
</listener-class>
</listener>
<servlet>
<servlet-name>ResourceServlet</servlet-name>
<servlet-class>
org.apache.myfaces.tobago.servlet.ResourceServlet
</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ResourceServlet</servlet-name>
<url-pattern>
/org/apache/myfaces/tobago/renderkit/*
</url-pattern>
</servlet-mapping>

MyFace Tobago library will not work if state saving method is set on client. To be sure that your installation will work correctly, insert also these lines in your web.xml file:

<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>

Empty JSP template for MyFaces Tobogo components will look like this:

<%@ taglib 
uri="http://myfaces.apache.org/tobago/component" prefix="tc" %>
<%@ taglib
uri="http://myfaces.apache.org/tobago/extension" prefix="tx" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<f:view>
<tc:page >
<tc:form>
YOUR CODE
</tc:form>
</tc:page>
</f:view>

MyFaces Tobago uses its own methods to set page layout using tc:panel component. You have to learn this before you put components on the page as you wish.


Support The Project

Contact


Component Libraries