This document covers how to configure Tomahawk 1.1.3 in the web.xml file and how to use Tomahawk with a Maven based project.

If you are not using Maven skip the Maven setup section, and just ensure you make needed changes to your web.xml file.

Maven setup

To get Tomahawk to work correctly, new jar files are needed. However, said jar files were not in the Maven ibilio repo so you will need to change the pom.xml to point to the new repo as follows:

      <repositories>

            <repository>

                  <id>apache-repo</id>

                  <name>apache-repo</name>

                  <url>http://myfaces.zones.apache.org/dist/maven-repository</url>

            </repository>

            <repository>

                  <id>ibiblio</id>

                  <name>ibiblio</name>

                  <url>http://www.ibiblio.org/maven2</url>

            </repository>

      </repositories>

Once the above is accomplished you can add the jar files to the pom.xml file as follows:

            <dependency>

                  <groupId>org.apache.myfaces.core</groupId>

                  <artifactId>myfaces-impl</artifactId>

                  <version>1.1.3</version>

                  <scope>compile</scope>

                  <type>jar</type>

            </dependency>

            <dependency>

                  <groupId>org.apache.myfaces.core</groupId>

                  <artifactId>myfaces-api</artifactId>

                  <version>1.1.3</version>

                  <scope>compile</scope>

                  <type>jar</type>

            </dependency>

            <dependency>

                  <groupId>org.apache.myfaces.tomahawk</groupId>

                  <artifactId>tomahawk</artifactId>

                  <version>1.1.3</version>

                  <scope>compile</scope>

                  <type>jar</type>

            </dependency>

Non Maven Users

Use Maven. If not make sure you have the following files in your WEB-INF/lib.

myfaces-api-1.1.3.jar
myfaces-impl-1.1.3.jar
tomahawk-1.1.3.jar

Changes to web.xml

In addition to the needing a new jar, the support classes package structure changed.

This necessitated two changes to web.xml as follows:

1) The filter class name changed:

<filter>

            <filter-name>extensionsFilter</filter-name>

            <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>

            ...

2) As did the Source code servlet class name as follows:

      <servlet>

            <servlet-name>SourceCodeServlet</servlet-name>

            <servlet-class>

            org.apache.myfaces.shared_tomahawk.util.servlet.SourceCodeServlet

            </servlet-class>

      </servlet>

More_tips_on_Upgrading_to_Tomahawk_1.1.3 (last edited 2009-09-20 23:01:32 by localhost)