Configuração do tomahawk

0 respostas
G

Olá,

Estou fazendo um projeto em JSF, e estou com um problema que aparentemente só posso resolver usando o myfaces tomahawk.
Segundo a pagina oficial eu preciso:

Put the tomahawk.jar in your WEB-INF/lib directory (or in the classpath of your application server.) Configure the MyFaces Extensions filter in your WEB-INF/web.xml file. Add the following to your JSP page in order to use one of the MyFaces custom components: <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t" %> That's it! You're good to go.
Até ai tudo bem. Eu baixei o JAR do tomahawk (tomahawk20-1.1.11), importei ele pra biblioteca do meu projeto, configurei o web-xml da seguinte forma:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
    <context-param>
        <param-name>javax.faces.PROJECT_STAGE</param-name>
        <param-value>Development</param-value>
    </context-param>
    <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    <session-config>
        <session-timeout>
            30
        </session-timeout>
    </session-config>
    <welcome-file-list>
        <welcome-file>faces/index.xhtml</welcome-file>
    </welcome-file-list>

    <filter>
	<filter-name>MyFacesExtensionsFilter</filter-name>
	<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
        <init-param>
            <param-name>uploadMaxFileSize</param-name>
            <param-value>20m</param-value>
            <description>Set the size limit for uploaded files.
                Format: 10 - 10 bytes
                        10k - 10 KB
                        10m - 10 MB
                        1g - 1 GB
            </description>
        </init-param>
    </filter>

    <!-- extension mapping for adding <script/>, <link/>, and other resource tags to JSF-pages  -->
    <filter-mapping>
        <filter-name>MyFacesExtensionsFilter</filter-name>
        <!-- servlet-name must match the name of your javax.faces.webapp.FacesServlet entry -->
        <servlet-name>Faces Servlet</servlet-name>
    </filter-mapping>

    <!-- extension mapping for serving page-independent resources (javascript, stylesheets, images, etc.)  -->
    <filter-mapping>
        <filter-name>MyFacesExtensionsFilter</filter-name>
        <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
    </filter-mapping>
</web-app>
Por fim, na minha página JSF eu coloquei, dentro do
xmlns:t="http://myfaces.apache.org/tomahawk"

Segundo o tutorial, eu aparentemente já poderia usar as tags do tomahawk, mas a unica tag que o netbeans está reconhecendo é "". Se eu tento fazer usar o "", que é o que eu preciso, o IDE me diz que "a biblioteca de componentes org.apache.myfaces.custom não contem tal componente"....

O que estou fazendo de errado?
Preciso baixar outro JAR?
(Coloquei todos os JARs do myfaces-core, myfaces-common e dos que estavam no zip do tomahawk, mas ainda estou com o problema)
Configurei algo errado?

Criado 8 de agosto de 2011
Respostas 0
Participantes 1