You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Todd Patrick <To...@dtn.com> on 2006/05/05 21:36:05 UTC

Oh so very very close - Filter Mapping Error still: ExtensionsFilter not correctly configured.

I have:

MyFaces Core 1.1.2
tomahawk-1.1.3-SNAPSHOT

My web.xml filter is set-up as:

    <filter>
        <filter-name>MyFacesExtensionsFilter</filter-name>
 
<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-
class>
        <init-param>
            <param-name>maxFileSize</param-name>
            <param-value>20m</param-value>
        </init-param>
    </filter>
    <filter-mapping>
        <filter-name>MyFacesExtensionsFilter</filter-name>
        <servlet-name>Faces Servlet</servlet-name>
    </filter-mapping>
    <filter-mapping>
        <filter-name>MyFacesExtensionsFilter</filter-name>
        <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
    </filter-mapping>
    <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>

However, I still return the error:

javax.servlet.ServletException: ExtensionsFilter not correctly
configured. JSF mapping missing. JSF pages not covered.


When I add:

<context-param>
	
<param-name>org.apache.myfaces.CHECK_EXTENSIONS_FILTER</param-name>
	<param-value>false</param-value>
</context-param>


I don't have the error, I just get plain HTML GUI controls.

I know I am close, but I can't get past this... Do I need to use the
SNAPSHOT of MyFaces Core instead of MyFaces Core 1.1.2?

Thanks,

--Todd

RE: Oh so very very close - Filter Mapping Error still: ExtensionsFilter not correctly configured.

Posted by "David G. Friedman" <hu...@ix.netcom.com>.
Todd,

I really doubt you need it for learning MyFaces and I recommend you take
those ExtensionFilter lines out of your web.xml until you get the hang of
JSF.  The core is basically equivalent to the JSF RI.  Tomahawk is extra
toys to play with and probably not even referenced in most older JSF books.
And, since it has been changing lately and being moved into a separate set
of package to help programmers see how distinct it is from the core, those
books which do reference Tomahawk probably don't even have the new syntax or
current usage information for it, hence your extensionsFilter problem as a
prime example of how it has changed lately.

However, if you are sure you need Tomahawk, which is an optional, component,
try taking the /WEB-INF/web.xml file from the tomahawk file
(tomahawk-examples-1.1.3-SNAPSHOT-bin.zip) example war:
tomahawk-examples-1.1.3-SNAPSHOT/myfaces-example-blank-1.1.3-SNAPSHOT.war
Both are available in the nightly section (I was just there and downloaded
it).

But, basically, THIS is how the tomahawk extensions are loaded in the 1.1.3
snapshot.  Again, you really should remove the extensions filter if you are
learning JSF - stick to the CORE until you can handle JSF with ease.

 <filter>
   <filter-name>extensionsFilter</filter-name>
   <filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</fi
lter-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>
<!-- followed by mappings -->
<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>

Regards,
David Friedman / humble@ix.netcom.com

-----Original Message-----
From: Todd Patrick [mailto:Todd.Patrick@dtn.com]
Sent: Friday, May 05, 2006 3:36 PM
To: MyFaces Discussion
Subject: Oh so very very close - Filter Mapping Error still:
ExtensionsFilter not correctly configured.


I have:

MyFaces Core 1.1.2
tomahawk-1.1.3-SNAPSHOT

My web.xml filter is set-up as:

    <filter>
        <filter-name>MyFacesExtensionsFilter</filter-name>

<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-
class>
        <init-param>
            <param-name>maxFileSize</param-name>
            <param-value>20m</param-value>
        </init-param>
    </filter>
    <filter-mapping>
        <filter-name>MyFacesExtensionsFilter</filter-name>
        <servlet-name>Faces Servlet</servlet-name>
    </filter-mapping>
    <filter-mapping>
        <filter-name>MyFacesExtensionsFilter</filter-name>
        <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
    </filter-mapping>
    <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>

However, I still return the error:

javax.servlet.ServletException: ExtensionsFilter not correctly
configured. JSF mapping missing. JSF pages not covered.


When I add:

<context-param>

<param-name>org.apache.myfaces.CHECK_EXTENSIONS_FILTER</param-name>
        <param-value>false</param-value>
</context-param>


I don't have the error, I just get plain HTML GUI controls.

I know I am close, but I can't get past this... Do I need to use the
SNAPSHOT of MyFaces Core instead of MyFaces Core 1.1.2?

Thanks,

--Todd