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: users@myfaces.apache.org
> 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
> ======================================================================
> ========
>
>   

Reply via email to