Joe,

I just checked the tomahawk-1.1.3.jar in our /lib and found that it contains 2 
ExtensionsFilter classes, in both org.apache.myfaces.webapp.filter and 
org.apache.myfaces.component.html.util.  Probably that is the reason that both 
paths work.

Here is my web.xml file, maybe it will be of use to you:

--------------------web.xml---------------------------------

<?xml version="1.0" encoding="UTF-8"?>
<!--
 * Copyright 2004 The Apache Software Foundation.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
-->
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>
        <display-name>googlehousemyface</display-name>
        <context-param>
                <description>State saving method: "client" or "server" (= 
default)
            See JSF Specification 2.5.2</description>
                <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
                <param-value>client</param-value>
        </context-param>
        <context-param>
                <description>This parameter tells MyFaces if javascript code 
should be allowed in the
            rendered HTML output.
            If javascript is allowed, command_link anchors will have javascript 
code
            that submits the corresponding form.
            If javascript is not allowed, the state saving info and nested 
parameters
            will be added as url parameters.
            Default: "true"</description>
                <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
                <param-value>true</param-value>
        </context-param>
        <context-param>
                <description>This parameter tells MyFaces if javascript code 
should be allowed in the
            rendered HTML output.
            If javascript is allowed, command_link anchors will have javascript 
code
            that submits the corresponding form.
            If javascript is not allowed, the state saving info and nested 
parameters
            will be added as url parameters.
            Default: "false"

            Setting this param to true should be combined with 
STATE_SAVING_METHOD "server" for
            best results.

            This is an EXPERIMENTAL feature. You also have to enable the 
detector filter/filter mapping below to get
            JavaScript detection working.</description>
                <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
                <param-value>false</param-value>
        </context-param>
        <context-param>
                <description>If true, rendered HTML code will be formatted, so 
that it is "human readable".
            i.e. additional line separators and whitespace will be written, 
that do not
            influence the HTML code.
            Default: "true"</description>
                <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
                <param-value>true</param-value>
        </context-param>
        <context-param>
                <description>If true, a javascript function will be rendered 
that is able to restore the
            former vertical scroll on every request. Convenient feature if you 
have pages
            with long lists and you do not want the browser page to always jump 
to the top
            if you trigger a link or button action that stays on the same page.
            Default: "false"</description>
                <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
                <param-value>true</param-value>
        </context-param>
        <context-param>
                <param-name>javax.faces.CONFIG_FILES</param-name>
                
<param-value>/WEB-INF/faces-config.xml,/WEB-INF/data-config.xml</param-value>
        </context-param>
        <filter>
                <filter-name>extensionsFilter</filter-name>
                
<filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</filter-class>
                <init-param>
                        <description>Set the size limit for uploaded files.
                Format: 10 - 10 bytes
                        10k - 10 KB
                        10m - 10 MB
                        1g - 1 GB</description>
                        <param-name>uploadMaxFileSize</param-name>
                        <param-value>100m</param-value>
                </init-param>
                <init-param>
                        <description>Set the threshold size - files
                    below this limit are stored in memory, files above
                    this limit are stored on disk.

                Format: 10 - 10 bytes
                        10k - 10 KB
                        10m - 10 MB
                        1g - 1 GB</description>
                        <param-name>uploadThresholdSize</param-name>
                        <param-value>100k</param-value>
                </init-param>
                <!--        <init-param>
            <param-name>uploadRepositoryPath</param-name>
            <param-value>/temp</param-value>
            <description>Set the path where the intermediary files will be 
stored.
            </description>
        </init-param>-->
        </filter>
        <filter-mapping>
                <filter-name>extensionsFilter</filter-name>
                <url-pattern>*.jsf</url-pattern>
        </filter-mapping>
        <filter-mapping>
                <filter-name>extensionsFilter</filter-name>
                <url-pattern>/faces/*</url-pattern>
        </filter-mapping>
        <!-- Listener, that does all the startup work (configuration, init). -->
        <listener>
                
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
        </listener>
        <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>*.jsf</url-pattern>
        </servlet-mapping>
        <welcome-file-list>
                <welcome-file>index.jsf</welcome-file>
                <welcome-file>index.jsp</welcome-file>
                <welcome-file>index.html</welcome-file>
        </welcome-file-list>
</web-app>
------------------------------------------------------------ 

I've been able to configure the tomahawk calendar component, but then decided 
in favor of Jenia's, check it out: http://www.jenia.org

HTH.
Simeon

-----Original Message-----
From: Rønnevik, Eivind [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 08, 2006 2:30 AM
To: MyFaces Discussion
Subject: RE: inputCalendar ExtensionsFilter not correctly configured


Hi!

I'm using myfaces 1.1.3 and tomahawk 1.1.3 running on Jboss, and tested one of 
my .jsps by including an inputCalendar. Worked fine for me. I'm including my 
web.xml, perhaps you can pick up something. 

But I just wanted to point out that I'm using the new location for the 
Extension filter in my web.xml, and I strongly believe you should as well. If I 
check my jar files I cannot find the Extensionfilter under 
org.apache.myfaces.component.html.util.ExtensionsFilter anymore, you shouldn't 
either if you don't have incorrect version of the jars I think.. It should be 
located in the Tomahawk.jar under org\apache\myfaces\webapp\filter 

I'm also including a small txt-document which I made as a "work procedure" for 
some of my colleagues when upgrading from 1.1.1 to 1.1.3.. I got the same error 
as you did when upgrading (javax.servlet.ServletException: ExtensionsFilter not 
correctly configured. JSF mapping missing. JSF pages not covered.), but I think 
that including filter mapping for url-pattern ".jsf" solved my case.. :)

---------------web.xml---------------------------------

 <filter>

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

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

        </init-param>
        <init-param>
            <description>Set the threshold size - files
                    below this limit are stored in memory, files above
                    this limit are stored on disk.

                Format: 10 - 10 bytes
                        10k - 10 KB
                        10m - 10 MB
                        1g - 1 GB
            </description>
            <param-name>uploadThresholdSize</param-name>
            <param-value>100k</param-value>
        </init-param>

    </filter>
    
    <filter-mapping>
    <filter-name>extensionsFilter</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>extensionsFilter</filter-name>
    <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
</filter-mapping>
    
    
    <filter-mapping>
     <filter-name>extensionsFilter</filter-name>
     <url-pattern>*.faces</url-pattern>
    </filter-mapping>   
    
     <filter-mapping>
     <filter-name>extensionsFilter</filter-name>
     <url-pattern>*.jsf</url-pattern>
    </filter-mapping>   
    
    <filter-mapping>
         <filter-name>extensionsFilter</filter-name>
          <url-pattern>*.jsp</url-pattern>
        </filter-mapping>
    
    <filter-mapping>
     <filter-name>extensionsFilter</filter-name>
     <url-pattern>/faces/*</url-pattern>
    </filter-mapping>     

-----------------------------------------------------------------------------


-------------------------How to upgrade to 1.1.3.txt----------------------------
How to upgrade to version 1.1.3 of MyFaces/Tomahawk with JBOSS

1. Update libraries:
        -       Remove myfaces*-libraries from jboss
                (JBOSS_HOME\server\<name>\deploy\jbossweb-tomcat55.sar\jsf-libs)

                Make sure u have the same versions of all the 
commons*-libraries in jboss as in WEB-INF/lib
                (If necessary copy/replace)
                
        -       Replace myfaces-api.jar with new version (myfaces-api-1.1.3.jar)
        -       Replace myfaces-impl.jar with new version 
(myfaces-impl-1.1.3.jar)
        -       Replace tomahawk.jar with new version (tomahawk-1.1.3.jar)
        
2. Update web.xml
        - Add following servlet:
                <servlet>
                <servlet-name>SourceCodeServlet</servlet-name>
            
<servlet-class>org.apache.myfaces.shared_tomahawk.util.servlet.SourceCodeServlet</servlet-class>
        </servlet> 
   
    - Modify filter-class of extension-filter (tomahawk-filter)
        #change filter-class from 
            
<filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</filter-class>
                #to
                
<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
                
    - Add filter-mappings if not already present:
        
        <filter-mapping>
                <filter-name>extensionsFilter</filter-name>
                <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
                </filter-mapping>
                
                <filter-mapping>
                    <filter-name>extensionsFilter</filter-name>
                <url-pattern>*.jsf</url-pattern>
        </filter-mapping>   
    
        <filter-mapping>
                        <filter-name>extensionsFilter</filter-name>
                        <url-pattern>*.jsp</url-pattern>
                </filter-mapping>
    
        
3. Update jsp-pages
        - In version 1.1.3 all <h:*> tags needs to be within a <h:form> and 
</h:form> tag. 
        (Becuase dummyForm has been removed from the implementation)
                The easiest thing to do is just to add a <h:form> tag just 
within the <body> tag, in this
                way you make sure that all <h:*> tags exist within the form 
tags. But this can result in that some commandLinks doesn't execute their 
action.
                If this is the case you have to add <h:form> for each element.
                
                Eks:
                
                        <html>
                                 <body>
                                        <h:form>
                                                        ....
                                                        ....
                                        </h:form>
                                 </body>
                        </html>
    
4. GOOD TO GO! :)


5. POSSIBLE ERRORS/EXCEPTIONS THAT MIGT OCCUR:

        - java.lang.NoClassDefFoundError: 
org/apache/myfaces/custom/buffer/HtmlBufferResponseWriterWrapper

                The class exist in the Tomahawk.jar, but has changed package 
from org/apache/myfaces/custom/buffer/
                to org\apache\myfaces\renderkit\html\util.



        - java.lang.IllegalStateException: ExtensionsFilter not correctly 
configured. JSF mapping missing. JSF pages not covered. Please see: 
http://myfaces.apache.org/tomahawk/extensionsFilter.html
         
org.apache.myfaces.renderkit.html.util.AddResourceFactory.throwExtensionsFilterMissing
         
                Check that the filter-mappings are ok. The problem could have 
something to do with the include of .jsp pages in other pages, 
                for example <[EMAIL PROTECTED] file="header.jsp" %>. So make 
sure that the mapping for .jsp pages exist and is correct
                
                
                
        - java.lang.NoSuchMethodError: .DummyFormUtils.isWriteDummyForm...
        
                Make sure that all <t, <h, compnents exists within a <h:form> 
tag
    
------------------------------------------------------------------------------------------------------------------------

Hope that this will get you through! :)

Regards,

Eivind





-----Original Message-----
From: Joe ersinghaus [mailto:[EMAIL PROTECTED] 
Sent: 7. august 2006 22:29
To: MyFaces Discussion
Subject: Re: inputCalendar ExtensionsFilter not correctly configured

Thanks Simeon for your quick reply.

I added your filter and filter-mapping to my web.xml but still no go. 
There must be something in my web.xml that's just not set up correctly or I'm 
not using the correct library jar files.

Of course, I can go back to 1.1.1 and get it to work or I can use the jMaki 
calendar control which is probably what I'll do until someone can put together 
a stable working tomahawk example.

Appreciate your help,

- Joe


Leyzerzon, Simeon wrote:
> Joe,
>
> This works for me, althought it give the following warning in WebLogic 8.1 
> sp2:
>
> <filter>
>               <filter-name>MyFacesExtensionsFilter</filter-name>
>               <filter-class>
>                       org.apache.myfaces.component.html.util.ExtensionsFilter
>               </filter-class>
>               <init-param>
>                       <param-name>maxFileSize</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>
>
>       <filter-mapping>
>               <filter-name>MyFacesExtensionsFilter</filter-name>
>               <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
>       </filter-mapping>
>
>
>
> 09:41:00,271  WARN ExtensionsFilter:34 - Please adjust your web.xml to 
> use org.apache.myfaces.webapp.filter.ExtensionsFilter
>
> But when I used the package specified in the warning, it didn't work, not 
> sure if it's fixed now or not.
>
> Simeon
>
> -----Original Message-----
> From: Joe ersinghaus [mailto:[EMAIL PROTECTED]
> Sent: Monday, August 07, 2006 1:45 PM
> To: [email protected]
> Subject: <t:inputCalendar ExtensionsFilter not correctly configured
>
>
> Hello,
>
> I've got a simple myfaces form running using the normal myfaces 
> controls like t:panelGrid, t:inputText and t:outputText tags. When I 
> added a t:inputCalendar, my app broke.
>
> This is a portion of the stack trace I got:
> "javax.servlet.ServletException: ExtensionsFilter not correctly 
> configured. JSF mapping missing. JSF pages not covered. Please see:
> http://myfaces.apache.org/tomahawk/extensionsFilter.html";
>
> Went to the page above and added example filter to my web.xml file but 
> my page still fails.
>
> Can anyone supply an example of a working web.xml file for 
> core/tomahawk 1.1.3?
>
> Thanks,
> - Joe
>
> ======================================================================
> ======== Please access the attached hyperlink for an important 
> electronic communications disclaimer:
>
> http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
> ======================================================================
> ========
>
>   


==============================================================================
Please access the attached hyperlink for an important electronic communications 
disclaimer: 

http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
==============================================================================

Reply via email to